From: Andrea Shepard Date: Mon, 1 Oct 2012 21:22:04 +0000 (-0700) Subject: Detach circuits from circuitmux early when freeing channel so they can find the chann... X-Git-Tag: tor-0.2.4.4-alpha~37^2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c097fb33fc081165a55f0b9417d7c8bf5dc91cd6;p=thirdparty%2Ftor.git Detach circuits from circuitmux early when freeing channel so they can find the channel by ID --- diff --git a/src/or/channel.c b/src/or/channel.c index 8241556b57..4ad5bf15f3 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -2766,6 +2766,10 @@ channel_free_list(smartlist_t *channels, int mark_for_close) "in state %s (%d)", curr, U64_PRINTF_ARG(curr->global_identifier), channel_state_to_string(curr->state), curr->state); + /* Detach circuits early so they can find the channel */ + if (curr->cmux) { + circuitmux_detach_all_circuits(curr->cmux); + } channel_unregister(curr); if (mark_for_close) { if (!(curr->state == CHANNEL_STATE_CLOSING ||