diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-12 17:00:42 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-12 17:00:42 +0000 |
commit | cce7548d0cbd12dc01b3ca29b21b30cb9efcb20b (patch) | |
tree | e685cb320cce6bd7b2bdfeae25054a12aa173246 | |
parent | afd0f2d13b711b37849e5d0fcf862b520acd778c (diff) | |
download | tor-cce7548d0cbd12dc01b3ca29b21b30cb9efcb20b.tar.gz tor-cce7548d0cbd12dc01b3ca29b21b30cb9efcb20b.zip |
r13737@catbus: nickm | 2007-07-12 12:57:30 -0400
Backport r10521: Fix a memory leak
svn:r10816
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/TODO.012 | 7 | ||||
-rw-r--r-- | src/or/circuitbuild.c | 11 |
3 files changed, 13 insertions, 6 deletions
@@ -37,6 +37,7 @@ Changes in version 0.1.2.15 - 2007-0?-?? - Fix a possible (but very unlikely) bug in picking routers by bandwidth. Add a log message to confirm that it is in fact unlikely. (Patch from lodger.) + - Backport a couple of memory leak fixes. - Backport miscellaneous cosmetic bugfixes. diff --git a/doc/TODO.012 b/doc/TODO.012 index d31af0fe98..e84b47d5fa 100644 --- a/doc/TODO.012 +++ b/doc/TODO.012 @@ -8,11 +8,10 @@ Backport items for 0.1.2: a nonexistent hidden service port o r10493: weight guard selection by bandwidth o r10495: change an assert into a tor_assert - - r10521: fix an impossible^Wapparently real memory leak + o r10521: fix an impossible^Wapparently real memory leak o r10524: make the LICENSE and AUTHORS files mention Tor. o r10563: use correct types with desc_digest_map. o r10566: build correctly on systems where size_t is bigger than ulong. - - r10579: new addsysuser implementation for osx (??) o r10643: eventdns.c behavior fix for solaris. - r10730: Don't choose guards after any never-connected-to guard. (??) o r10760: fix possible buffer overrun in old BSD natd code @@ -20,4 +19,8 @@ Backport items for 0.1.2: - Some fix for bug 455. +Backport for 0.1.2.x once better tested: + - r10579: new addsysuser implementation for osx (??) + + diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 6ef3677c28..7ae2abbc8b 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2255,10 +2255,8 @@ static void entry_guards_prepend_from_config(void) { or_options_t *options = get_options(); - smartlist_t *entry_routers = smartlist_create(); - smartlist_t *old_entry_guards_on_list = smartlist_create(); - smartlist_t *old_entry_guards_not_on_list = smartlist_create(); - smartlist_t *entry_fps = smartlist_create(); + smartlist_t *entry_routers, *entry_fps; + smartlist_t *old_entry_guards_on_list, *old_entry_guards_not_on_list; tor_assert(entry_guards); should_add_entry_nodes = 0; @@ -2274,6 +2272,11 @@ entry_guards_prepend_from_config(void) log_info(LD_CIRC,"Adding configured EntryNodes '%s'.", options->EntryNodes); + entry_routers = smartlist_create(); + entry_fps = smartlist_create(); + old_entry_guards_on_list = smartlist_create(); + old_entry_guards_not_on_list = smartlist_create(); + /* Split entry guards into those on the list and those not. */ add_nickname_list_to_smartlist(entry_routers, options->EntryNodes, 0); SMARTLIST_FOREACH(entry_routers, routerinfo_t *, ri, |