mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
we were leaking a smartlist every time we built a circuit
svn:r5795
This commit is contained in:
parent
d60faa7c93
commit
5ca40affeb
1 changed files with 3 additions and 1 deletions
|
@ -1495,13 +1495,15 @@ static routerinfo_t *
|
||||||
choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
|
choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
|
||||||
{
|
{
|
||||||
routerinfo_t *r, *choice;
|
routerinfo_t *r, *choice;
|
||||||
smartlist_t *excluded = smartlist_create();
|
smartlist_t *excluded;
|
||||||
or_options_t *options = get_options();
|
or_options_t *options = get_options();
|
||||||
|
|
||||||
if (state && options->UseEntryGuards) {
|
if (state && options->UseEntryGuards) {
|
||||||
return choose_random_entry(state);
|
return choose_random_entry(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
excluded = smartlist_create();
|
||||||
|
|
||||||
if (state && (r = build_state_get_exit_router(state))) {
|
if (state && (r = build_state_get_exit_router(state))) {
|
||||||
smartlist_add(excluded, r);
|
smartlist_add(excluded, r);
|
||||||
routerlist_add_family(excluded, r);
|
routerlist_add_family(excluded, r);
|
||||||
|
|
Loading…
Add table
Reference in a new issue