mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix memory leak in routerlist_remove_old_routers().
svn:r5790
This commit is contained in:
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user