summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 3d16e1453c..8e7cd9ea51 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -622,6 +622,11 @@ connection_or_about_to_close(or_connection_t *or_conn)
/* Tell the controlling channel we're closed */
if (or_conn->chan) {
channel_closed(TLS_CHAN_TO_BASE(or_conn->chan));
+ /*
+ * NULL this out because the channel might hang around a little
+ * longer before channel_run_cleanup() gets it.
+ */
+ or_conn->chan->conn = NULL;
or_conn->chan = NULL;
}