diff options
author | Roger Dingledine <arma@torproject.org> | 2004-06-02 18:32:24 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-06-02 18:32:24 +0000 |
commit | 69931106f898aecb60d503d6e10e3aa118961c29 (patch) | |
tree | 99ea7ee36a2fc5820e8a764cb8e143a784db7dad /src/or/connection_edge.c | |
parent | 0932505829b3c06b1ad4828005601dce3a74586b (diff) | |
download | tor-69931106f898aecb60d503d6e10e3aa118961c29.tar tor-69931106f898aecb60d503d6e10e3aa118961c29.tar.gz |
be sure to detach streams from the circuit linked list before freeing them
also, don't bother marking a conn for close if you're about to free it
svn:r1935
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 3cbd54d15..4f96b1468 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -648,7 +648,6 @@ int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) { if(rend_service_set_connection_addr_port(n_stream, circ) < 0) { log_fn(LOG_INFO,"Didn't find rendezvous service (port %d)",n_stream->port); connection_edge_end(n_stream, END_STREAM_REASON_EXITPOLICY, n_stream->cpath_layer); - connection_mark_for_close(n_stream); connection_free(n_stream); circuit_mark_for_close(circ); /* knock the whole thing down, somebody screwed up */ return 0; @@ -683,7 +682,6 @@ int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) { case -1: /* resolve failed */ log_fn(LOG_INFO,"Resolve failed (%s).", n_stream->address); connection_edge_end(n_stream, END_STREAM_REASON_RESOLVEFAILED, n_stream->cpath_layer); - connection_mark_for_close(n_stream); connection_free(n_stream); break; case 0: /* resolve added to pending list */ @@ -710,7 +708,6 @@ void connection_exit_connect(connection_t *conn) { router_compare_to_my_exit_policy(conn) == ADDR_POLICY_REJECTED) { log_fn(LOG_INFO,"%s:%d failed exit policy. Closing.", conn->address, conn->port); connection_edge_end(conn, END_STREAM_REASON_EXITPOLICY, conn->cpath_layer); - connection_mark_for_close(conn); circuit_detach_stream(circuit_get_by_conn(conn), conn); connection_free(conn); return; @@ -720,7 +717,6 @@ void connection_exit_connect(connection_t *conn) { switch(connection_connect(conn, conn->address, conn->addr, conn->port)) { case -1: connection_edge_end(conn, END_STREAM_REASON_CONNECTFAILED, conn->cpath_layer); - connection_mark_for_close(conn); circuit_detach_stream(circuit_get_by_conn(conn), conn); connection_free(conn); return; |