aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2014-02-06 14:47:34 -0800
committerAndrea Shepard <andrea@torproject.org>2014-02-06 14:47:34 -0800
commit707c1e2e263fd34f70a5f780e77820d667ba2931 (patch)
tree8b6365594d3dd5171c6b435c37c13b8ffa485428 /src/or/connection_or.c
parentb4e8d8dc0e6f942346895a5cff123db3aa1f94d5 (diff)
downloadtor-707c1e2e263fd34f70a5f780e77820d667ba2931.tar
tor-707c1e2e263fd34f70a5f780e77820d667ba2931.tar.gz
NULL out conns on tlschans when freeing in case channel_run_cleanup() is late; fixes bug 9602
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 3d16e1453..8e7cd9ea5 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;
}