2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

detach unfinished query when canceling

when a query was canceled while still in the process of connecting,
tcp_connected() and udp_ready() didn't detach the query object.
This commit is contained in:
Evan Hunt
2022-04-10 17:42:49 -07:00
committed by Aram Sargsyan
parent b944bf4120
commit 6bf8535542

View File

@@ -3097,6 +3097,7 @@ udp_ready(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
query->started = true; query->started = true;
if (atomic_load(&cancel_now)) { if (atomic_load(&cancel_now)) {
query_detach(&query);
return; return;
} }
@@ -3452,6 +3453,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
query->started = true; query->started = true;
if (atomic_load(&cancel_now)) { if (atomic_load(&cancel_now)) {
query_detach(&query);
return; return;
} }