[or-cvs] don"t double-detach a closing exit conn that"s waiting for ...
Roger Dingledine
arma at seul.org
Mon Jan 31 01:27:51 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:
connection.c
Log Message:
don't double-detach a closing exit conn that's waiting for dns resolve
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -d -r1.319 -r1.320
--- connection.c 31 Jan 2005 01:02:20 -0000 1.319
+++ connection.c 31 Jan 2005 01:27:49 -0000 1.320
@@ -215,6 +215,7 @@
*/
void connection_about_to_close_connection(connection_t *conn)
{
+ circuit_t *circ;
assert(conn->marked_for_close);
@@ -271,7 +272,9 @@
break;
case CONN_TYPE_EXIT:
if (conn->state == EXIT_CONN_STATE_RESOLVING) {
- circuit_detach_stream(circuit_get_by_conn(conn), conn);
+ circ = circuit_get_by_conn(conn);
+ if (circ)
+ circuit_detach_stream(circ, conn);
connection_dns_remove(conn);
}
break;
More information about the tor-commits
mailing list