Skip to content
Snippets Groups Projects
Commit 02891442 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Fix another crash bug found by Jaroslaw--it is possible for dns_resolve to...

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
parent aac97a3c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment