aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-01-11 04:14:10 +0000
committerRoger Dingledine <arma@torproject.org>2006-01-11 04:14:10 +0000
commit5ca40affebeffbe6dfae9d6b91c72c427e582d2b (patch)
tree78e84e1b05fc303178a3504702eb82f97afc39b4 /src
parentd60faa7c939017f31d73b72b782ba6782947ab72 (diff)
downloadtor-5ca40affebeffbe6dfae9d6b91c72c427e582d2b.tar
tor-5ca40affebeffbe6dfae9d6b91c72c427e582d2b.tar.gz
we were leaking a smartlist every time we built a circuit
svn:r5795
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 2195810b2..9552ba424 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1495,13 +1495,15 @@ static routerinfo_t *
choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
{
routerinfo_t *r, *choice;
- smartlist_t *excluded = smartlist_create();
+ smartlist_t *excluded;
or_options_t *options = get_options();
if (state && options->UseEntryGuards) {
return choose_random_entry(state);
}
+ excluded = smartlist_create();
+
if (state && (r = build_state_get_exit_router(state))) {
smartlist_add(excluded, r);
routerlist_add_family(excluded, r);