[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Fix another crash bug found by Jaroslaw--it is possible for...



Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv7914/src/or

Modified Files:
	connection_edge.c 
Log Message:
Fix another crash bug found by Jaroslaw--it is possible for dns_resolve to mark a connection to be freed, if the circuit it was attached to fails for some reason.

Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -d -r1.276 -r1.277
--- connection_edge.c	10 Feb 2005 23:18:39 -0000	1.276
+++ connection_edge.c	14 Feb 2005 21:16:27 -0000	1.277
@@ -910,7 +910,8 @@
       /* Connection freed; don't touch it. */
       return 0;
     case 1: /* The result was cached; a resolved cell was sent. */
-      connection_free(dummy_conn);
+      if (!dummy_conn->marked_for_close)
+        connection_free(dummy_conn);
       return 0;
     case 0: /* resolve added to pending list */
       dummy_conn->next_stream = circ->resolving_streams;