aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-02-14 21:16:27 +0000
committerNick Mathewson <nickm@torproject.org>2005-02-14 21:16:27 +0000
commit0289144229ea73f5c5ed514b14dac775a7385a29 (patch)
tree1ab6950c288eafe280f8e95892f482bdc0b2f22d /src
parentaac97a3c6a6971bebabbfe8f2779cda99438194c (diff)
downloadtor-0289144229ea73f5c5ed514b14dac775a7385a29.tar.gz
tor-0289144229ea73f5c5ed514b14dac775a7385a29.zip
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.
svn:r3623
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_edge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 65ec80aaf9..b45f75b175 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -910,7 +910,8 @@ int connection_exit_begin_resolve(cell_t *cell, circuit_t *circ) {
/* 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;