From 6bf8535542f7b23459dabd743e34b4768af6f31b Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Sun, 10 Apr 2022 17:42:49 -0700 Subject: [PATCH] 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. --- bin/dig/dighost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 0c09f3f590..0b3a66a5c0 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3097,6 +3097,7 @@ udp_ready(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { query->started = true; if (atomic_load(&cancel_now)) { + query_detach(&query); return; } @@ -3452,6 +3453,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { query->started = true; if (atomic_load(&cancel_now)) { + query_detach(&query); return; }