diff --git a/lib/dns/message.c b/lib/dns/message.c index 830d452a10..b67d6d299c 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -3167,14 +3167,15 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view) { return (ISC_R_UNEXPECTEDEND); } - result = dns_rdata_tostruct(&rdata, &sig, msg->mctx); + result = dns_rdata_tostruct(&rdata, &sig, NULL); if (result != ISC_R_SUCCESS) { return (result); } dns_rdataset_init(&keyset); if (view == NULL) { - return (DNS_R_KEYUNAUTHORIZED); + result = DNS_R_KEYUNAUTHORIZED; + goto freesig; } result = dns_view_simplefind(view, &sig.signer, dns_rdatatype_key /* SIG(0) */, 0,