diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-01-11 03:58:07 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-01-11 03:58:07 +0000 |
commit | eb78295e4e498b6f220b56f35babb82d5513d0c9 (patch) | |
tree | 29c013382aa8993a156a9260aba524ef9556d127 /src | |
parent | 6a9ca9e790d2960f9ee3610b2b0343df9930291e (diff) | |
download | tor-eb78295e4e498b6f220b56f35babb82d5513d0c9.tar.gz tor-eb78295e4e498b6f220b56f35babb82d5513d0c9.zip |
Fix memory leak in routerlist_remove_old_routers().
svn:r5790
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 519dd784a7..0513495237 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -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); } |