From: Mark Andrews Date: Wed, 6 Oct 2021 07:32:19 +0000 (+1100) Subject: Correctly call dns_dispatch_done() in dns_dispatch_cancel() X-Git-Tag: v9.17.19~7^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7c362738d919e0960ae1e3ceeefbf4f7668bc62;p=thirdparty%2Fbind9.git Correctly call dns_dispatch_done() in dns_dispatch_cancel() Pass '&resp' rather than 'respp' as we have already cleared '*respp' when we took ownership of 'resp'. --- diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c index c702656431a..3e0daa02f2c 100644 --- a/lib/dns/dispatch.c +++ b/lib/dns/dispatch.c @@ -1482,6 +1482,7 @@ dns_dispatch_cancel(dns_dispentry_t **respp) { REQUIRE(respp != NULL); resp = *respp; + *respp = NULL; REQUIRE(VALID_RESPONSE(resp)); @@ -1530,7 +1531,7 @@ dns_dispatch_cancel(dns_dispentry_t **respp) { } done: - dns_dispatch_done(respp); + dns_dispatch_done(&resp); } void