fix memory leak in dos stream for resolve requests

This commit is contained in:
trinity-1686a 2023-10-29 19:16:49 +01:00
parent d3dadf51af
commit 798fe6c5ed
No known key found for this signature in database
GPG Key ID: 7F9D324B2661C978

View File

@ -4234,8 +4234,10 @@ connection_exit_begin_resolve(cell_t *cell, or_circuit_t *circ)
break; break;
case DOS_STREAM_DEFENSE_REFUSE_STREAM: case DOS_STREAM_DEFENSE_REFUSE_STREAM:
dns_send_resolved_error_cell(dummy_conn, RESOLVED_TYPE_ERROR_TRANSIENT); dns_send_resolved_error_cell(dummy_conn, RESOLVED_TYPE_ERROR_TRANSIENT);
connection_free_(TO_CONN(dummy_conn));
return 0; return 0;
case DOS_STREAM_DEFENSE_CLOSE_CIRCUIT: case DOS_STREAM_DEFENSE_CLOSE_CIRCUIT:
connection_free_(TO_CONN(dummy_conn));
return -END_CIRC_REASON_RESOURCELIMIT; return -END_CIRC_REASON_RESOURCELIMIT;
} }