From: Roger Dingledine Date: Mon, 14 Mar 2005 04:42:52 +0000 (+0000) Subject: fix an assert trigger in cvs: if a resolve request fails, and the circuit X-Git-Tag: tor-0.1.0.1-rc~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=316afb6d09a8be8f2d046887b869d0d10a88de14;p=thirdparty%2Ftor.git 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 --- 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);