diff options
author | Andrea Shepard <andrea@torproject.org> | 2014-02-06 14:47:34 -0800 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2014-02-06 14:47:34 -0800 |
commit | 707c1e2e263fd34f70a5f780e77820d667ba2931 (patch) | |
tree | 8b6365594d3dd5171c6b435c37c13b8ffa485428 /src/or/connection_or.c | |
parent | b4e8d8dc0e6f942346895a5cff123db3aa1f94d5 (diff) | |
download | tor-707c1e2e263fd34f70a5f780e77820d667ba2931.tar.gz tor-707c1e2e263fd34f70a5f780e77820d667ba2931.zip |
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.c | 5 |
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; } |