mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Avoid double-free on tor-resolve failure
svn:r3567
This commit is contained in:
parent
bb32fa86d7
commit
a64b03a4fd
@ -906,8 +906,10 @@ int connection_exit_begin_resolve(cell_t *cell, circuit_t *circ) {
|
||||
|
||||
/* send it off to the gethostbyname farm */
|
||||
switch (dns_resolve(dummy_conn)) {
|
||||
case 1: /* The result was cached; a resolved cell was sent. */
|
||||
case -1: /* Impossible to resolve; a resolved cell was sent. */
|
||||
/* Connection freed; don't touch it. */
|
||||
return 0;
|
||||
case 1: /* The result was cached; a resolved cell was sent. */
|
||||
connection_free(dummy_conn);
|
||||
return 0;
|
||||
case 0: /* resolve added to pending list */
|
||||
|
Loading…
Reference in New Issue
Block a user