]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Destroy the message before detaching the view
authorMark Andrews <marka@isc.org>
Mon, 4 Dec 2023 01:23:18 +0000 (12:23 +1100)
committerMark Andrews <marka@isc.org>
Mon, 4 Dec 2023 22:00:25 +0000 (22:00 +0000)
With shared name memory pools (f5af981831ea8a707090c1b09a47c25b75d86b5a)
the message needs to be destroyed before the view is detached which
in turn detaches the resolver which checks that all resources have
been returned.

lib/dns/validator.c

index 3b9c8fc5db43716361361a6d45eb987fd0dd1cf9..b679392c49ef838f739549e5abd20e55f7ad1e9f 100644 (file)
@@ -3119,10 +3119,10 @@ destroy_validator(dns_validator_t *val) {
        if (val->siginfo != NULL) {
                isc_mem_put(mctx, val->siginfo, sizeof(*val->siginfo));
        }
-       dns_view_detach(&val->view);
        if (val->message != NULL) {
                dns_message_detach(&val->message);
        }
+       dns_view_detach(&val->view);
        isc_mem_put(mctx, val, sizeof(*val));
 }