summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-03-14 04:42:52 +0000
committerRoger Dingledine <arma@torproject.org>2005-03-14 04:42:52 +0000
commit316afb6d09a8be8f2d046887b869d0d10a88de14 (patch)
tree4eb680b6035b836b1f65b2385831b5f7eb2775d8 /src/or
parent0197b47ce906a5c7259e0bb240fdd7bb681df5ce (diff)
downloadtor-316afb6d09a8be8f2d046887b869d0d10a88de14.tar.gz
tor-316afb6d09a8be8f2d046887b869d0d10a88de14.zip
fix an assert trigger in cvs: if a resolve request fails, and the circuit
has vanished in the meantime, then we would both mark it for close (i.e. put it on the closeable list) and also immediately free it. svn:r3759
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index d5aeb8208a..3913ef5df7 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -277,7 +277,8 @@ int dns_resolve(connection_t *exitconn) {
circ = circuit_get_by_conn(exitconn);
if (circ)
circuit_detach_stream(circ, exitconn);
- connection_free(exitconn);
+ if (!exitconn->marked_for_close)
+ connection_free(exitconn);
return -1;
}
tor_assert(0);