]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
detach unfinished query when canceling
authorEvan Hunt <each@isc.org>
Mon, 11 Apr 2022 00:42:49 +0000 (17:42 -0700)
committerAram Sargsyan <aram@isc.org>
Thu, 14 Apr 2022 09:34:40 +0000 (09:34 +0000)
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

index 0c09f3f59056ea932e64ca3db8228654c714f55d..0b3a66a5c015d4230b3d9e68d070c7a3b7a74976 100644 (file)
@@ -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;
        }