diff options
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 5513c71ed5..8224423e92 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -868,7 +868,8 @@ dns_cancel_pending_resolve(const char *address) circ = circuit_get_by_edge_conn(pendconn); if (circ) circuit_detach_stream(circ, pendconn); - connection_free(TO_CONN(pendconn)); + if (!pendconn->_base.marked_for_close) + connection_free(TO_CONN(pendconn)); resolve->pending_connections = pend->next; tor_free(pend); } |