From 2771a5b64da24ddbb385bfb4a5b6e3f5d2363a19 Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Tue, 29 Mar 2022 13:01:24 +0000 Subject: [PATCH] Add a missing clear_current_lookup() call in recv_done() The error code path handling the `ISC_R_CANCELED` code lacks a `clear_current_lookup()` call, without which dig hangs indefinitely when handling the error. Add the missing call to account for all references of the lookup so it can be destroyed. --- bin/dig/dighost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 35d29eefd8..721c68f20f 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3844,6 +3844,7 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region, } query_detach(&query); lookup_detach(&l); + clear_current_lookup(); UNLOCK_LOOKUP; return; }