From: Mark Andrews Date: Mon, 4 Dec 2023 01:23:18 +0000 (+1100) Subject: Destroy the message before detaching the view X-Git-Tag: v9.19.19~15^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ee20d7d108069f189bc6b4a578155ec0086472d;p=thirdparty%2Fbind9.git Destroy the message before detaching the view 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. --- diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 3b9c8fc5db4..b679392c49e 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -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)); }