From 316afb6d09a8be8f2d046887b869d0d10a88de14 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Mon, 14 Mar 2005 04:42:52 +0000 Subject: [PATCH] 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 --- src/or/dns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);