From: George Kadianakis Date: Tue, 17 Jan 2017 11:26:59 +0000 (+0200) Subject: Correctly maintain circuits in circuits_pending_other_guards(). X-Git-Tag: tor-0.3.0.2-alpha~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bc440eda476e3d270aa5fe1810a3d1d4778d725;p=thirdparty%2Ftor.git Correctly maintain circuits in circuits_pending_other_guards(). --- diff --git a/changes/bug21142 b/changes/bug21142 new file mode 100644 index 0000000000..e232f43fe7 --- /dev/null +++ b/changes/bug21142 @@ -0,0 +1,4 @@ + o Minor bugfixes (client, guards): + - Fix bug where Tor would think that there are circuits waiting for better + guards even though those circuits have been freed. Fixes bug #21142; + bugfix on 0.3.0.1-alpha. diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 2d2dbccc5d..54a7db9dbf 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -1858,6 +1858,9 @@ circuit_about_to_free(circuit_t *circ) if (circuits_pending_chans) smartlist_remove(circuits_pending_chans, circ); } + if (circuits_pending_other_guards) { + smartlist_remove(circuits_pending_other_guards, circ); + } if (CIRCUIT_IS_ORIGIN(circ)) { control_event_circuit_status(TO_ORIGIN_CIRCUIT(circ), (circ->state == CIRCUIT_STATE_OPEN ||