aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-05-24 23:39:04 +0000
committerRoger Dingledine <arma@torproject.org>2007-05-24 23:39:04 +0000
commit42d7b0877d8ae753b16c62007524971a681c7a9e (patch)
tree24a438a5bf2834f257b50c984cb1dc0ca1640688
parent703bf1962068a2beb8754f9bb772efd7eb3c100d (diff)
downloadtor-42d7b0877d8ae753b16c62007524971a681c7a9e.tar
tor-42d7b0877d8ae753b16c62007524971a681c7a9e.tar.gz
forward-port r10318
svn:r10319
-rw-r--r--src/or/circuitbuild.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 902ddb4ff..21be66dd1 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2347,8 +2347,10 @@ choose_random_entry(cpath_build_state_t *state)
int need_uptime = state->need_uptime;
int need_capacity = state->need_capacity;
- smartlist_add(exit_family, chosen_exit);
- routerlist_add_family(exit_family, chosen_exit);
+ if (chosen_exit) {
+ smartlist_add(exit_family, chosen_exit);
+ routerlist_add_family(exit_family, chosen_exit);
+ }
if (!entry_guards)
entry_guards = smartlist_create();