summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-05-21 12:25:15 +0000
committerRoger Dingledine <arma@torproject.org>2004-05-21 12:25:15 +0000
commitf51061439b086e5eef460023a02893cfb8931d65 (patch)
tree16d2e1c12715fa89aafbe7f8a71bfc41e0bc00eb /src/or/connection.c
parent3532ba8177dc79a5f5ee014403e5d747ef1a12cd (diff)
downloadtor-f51061439b086e5eef460023a02893cfb8931d65.tar.gz
tor-f51061439b086e5eef460023a02893cfb8931d65.zip
when the dns resolve is cancelled, or fails, be sure to remove
conn from circ->resolving_streams otherwise it gets freed and stays there, causing seg faults. svn:r1915
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index e868a43bf9..90bcd83a3c 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -208,8 +208,10 @@ void connection_about_to_close_connection(connection_t *conn)
}
break;
case CONN_TYPE_EXIT:
- if (conn->state == EXIT_CONN_STATE_RESOLVING)
+ if (conn->state == EXIT_CONN_STATE_RESOLVING) {
+ circuit_detach_stream(circuit_get_by_conn(conn), conn);
connection_dns_remove(conn);
+ }
break;
case CONN_TYPE_DNSWORKER:
if (conn->state == DNSWORKER_STATE_BUSY) {