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
This commit is contained in:
Roger Dingledine 2005-03-14 04:42:52 +00:00
parent 0197b47ce9
commit 316afb6d09

View File

@ -277,6 +277,7 @@ int dns_resolve(connection_t *exitconn) {
circ = circuit_get_by_conn(exitconn); circ = circuit_get_by_conn(exitconn);
if (circ) if (circ)
circuit_detach_stream(circ, exitconn); circuit_detach_stream(circ, exitconn);
if (!exitconn->marked_for_close)
connection_free(exitconn); connection_free(exitconn);
return -1; return -1;
} }