diff options
author | Roger Dingledine <arma@torproject.org> | 2008-10-12 03:19:17 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-10-12 03:19:17 +0000 |
commit | 95aace5aae787b54a2eb9e29b0993d31b45e3ca9 (patch) | |
tree | 44eb7e01633bc5b9eb366898f7e805acc478d5d3 | |
parent | 37883ca4bc7f3ccb6f403b6a093bc23f1607033a (diff) | |
download | tor-95aace5aae787b54a2eb9e29b0993d31b45e3ca9.tar.gz tor-95aace5aae787b54a2eb9e29b0993d31b45e3ca9.zip |
minor memory leak found by coverity
svn:r17061
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files 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, |