mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 05:26:20 +02:00
Fix memory leak in routerlist_remove_old_routers().
svn:r5790
This commit is contained in:
parent
6a9ca9e790
commit
eb78295e4e
@ -1802,7 +1802,7 @@ routerlist_remove_old_routers(void)
|
||||
*/
|
||||
if (smartlist_len(routerlist->old_routers) <
|
||||
smartlist_len(routerlist->routers) * (MAX_DESCRIPTORS_PER_ROUTER - 1))
|
||||
return;
|
||||
goto done;
|
||||
|
||||
smartlist_sort(routerlist->old_routers, _compare_old_routers_by_identity);
|
||||
|
||||
@ -1823,6 +1823,8 @@ routerlist_remove_old_routers(void)
|
||||
if (hi>=0)
|
||||
routerlist_remove_old_cached_routers_with_id(cutoff, 0, hi, retain);
|
||||
routerlist_assert_ok(routerlist);
|
||||
|
||||
done:
|
||||
digestmap_free(retain, NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user