From 95aace5aae787b54a2eb9e29b0993d31b45e3ca9 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sun, 12 Oct 2008 03:19:17 +0000 Subject: [PATCH] minor memory leak found by coverity svn:r17061 --- src/or/circuitbuild.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index c7b780d99a..ce5419efc3 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1306,8 +1306,7 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime, * at least one predicted exit port. */ int try; - smartlist_t *needed_ports; - smartlist_t *supporting = smartlist_create(), *use = smartlist_create(); + smartlist_t *needed_ports, *supporting, *use; if (best_support == -1) { if (need_uptime || need_capacity) { @@ -1322,6 +1321,8 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime, log_notice(LD_CIRC, "All routers are down or won't exit -- choosing a " "doomed exit at random."); } + supporting = smartlist_create(); + use = smartlist_create(); needed_ports = circuit_get_unhandled_ports(time(NULL)); for (try = 0; try < 2; try++) { /* try once to pick only from routers that satisfy a needed port,