[or-cvs] fix an assert trigger in cvs: if a resolve request fails, a...

Roger Dingledine arma at seul.org
Mon Mar 14 04:42:55 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	dns.c 
Log Message:
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.


Index: dns.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dns.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- dns.c	14 Mar 2005 03:18:35 -0000	1.138
+++ dns.c	14 Mar 2005 04:42:52 -0000	1.139
@@ -277,7 +277,8 @@
         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);



More information about the tor-commits mailing list