]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Correctly call dns_dispatch_done() in dns_dispatch_cancel()
authorMark Andrews <marka@isc.org>
Wed, 6 Oct 2021 07:32:19 +0000 (18:32 +1100)
committerOndřej Surý <ondrej@sury.org>
Wed, 6 Oct 2021 15:20:38 +0000 (17:20 +0200)
Pass '&resp' rather than 'respp' as we have already cleared '*respp'
when we took ownership of 'resp'.

lib/dns/dispatch.c

index c702656431a88b35974d0e2f0e6d9583aa2fb90a..3e0daa02f2cbaad4f4eaaed078f22b0d39e92f9b 100644 (file)
@@ -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