diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-01-16 05:27:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-01-16 05:27:19 +0000 |
commit | 4a3b7496f0c47b0d00c9744698eaa237e601b32a (patch) | |
tree | fdefeb3c864306cc52f3e9f5dadb8414f8a99187 /src/or/networkstatus.c | |
parent | 24aae484c93b09c7fc735e53874f02a22e4b5b43 (diff) | |
download | tor-4a3b7496f0c47b0d00c9744698eaa237e601b32a.tar.gz tor-4a3b7496f0c47b0d00c9744698eaa237e601b32a.zip |
r17639@catbus: nickm | 2008-01-15 19:09:21 -0500
Fix some hard to trigger but nonetheless real memory leaks spotted by an anonymous contributor. Needs review. Partial backport candidate.
svn:r13147
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r-- | src/or/networkstatus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index b406166023..e0b07518ab 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1796,7 +1796,7 @@ networkstatus_getinfo_by_purpose(const char *purpose_string, time_t now) time_t cutoff = now - ROUTER_MAX_AGE_TO_PUBLISH; char *answer; routerlist_t *rl = router_get_routerlist(); - smartlist_t *statuses = smartlist_create(); + smartlist_t *statuses; uint8_t purpose = router_purpose_from_string(purpose_string); routerstatus_t rs; int bridge_auth = authdir_mode_bridge(get_options()); @@ -1807,6 +1807,7 @@ networkstatus_getinfo_by_purpose(const char *purpose_string, time_t now) return NULL; } + statuses = smartlist_create(); SMARTLIST_FOREACH(rl->routers, routerinfo_t *, ri, { if (ri->cache_info.published_on < cutoff) continue; |