diff options
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 902ddb4ff3..21be66dd13 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(); |