Destroy the message before detaching the view

With shared name memory pools (f5af981831)
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.
This commit is contained in:
Mark Andrews
2023-12-04 12:23:18 +11:00
parent f491845f5a
commit 7ee20d7d10

View 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));
}