summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-12 17:00:42 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-12 17:00:42 +0000
commitcce7548d0cbd12dc01b3ca29b21b30cb9efcb20b (patch)
treee685cb320cce6bd7b2bdfeae25054a12aa173246 /src/or
parentafd0f2d13b711b37849e5d0fcf862b520acd778c (diff)
downloadtor-cce7548d0cbd12dc01b3ca29b21b30cb9efcb20b.tar.gz
tor-cce7548d0cbd12dc01b3ca29b21b30cb9efcb20b.zip
r13737@catbus: nickm | 2007-07-12 12:57:30 -0400
Backport r10521: Fix a memory leak svn:r10816
Diffstat (limited to 'src/or')
-rw-r--r--src/or/circuitbuild.c11
1 files changed, 7 insertions, 4 deletions
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,