]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Detach circuits from circuitmux early when freeing channel so they can find the chann...
authorAndrea Shepard <andrea@torproject.org>
Mon, 1 Oct 2012 21:22:04 +0000 (14:22 -0700)
committerAndrea Shepard <andrea@torproject.org>
Wed, 10 Oct 2012 07:44:46 +0000 (00:44 -0700)
src/or/channel.c

index 8241556b578bd92759f85b1c3468776a1894603f..4ad5bf15f38854931a2784830b5a9f3be9955502 100644 (file)
@@ -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 ||