[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] we were leaking a smartlist every time we built a circuit



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c 
Log Message:
we were leaking a smartlist every time we built a circuit


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -p -d -r1.208 -r1.209
--- circuitbuild.c	11 Jan 2006 04:04:42 -0000	1.208
+++ circuitbuild.c	11 Jan 2006 04:14:10 -0000	1.209
@@ -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);