]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Stop passing mctx to dns_rdata_tostruct as it is unnecessary for SIG
authorMark Andrews <marka@isc.org>
Wed, 21 Sep 2022 01:54:48 +0000 (11:54 +1000)
committerPetr Špaček <pspacek@isc.org>
Mon, 26 Sep 2022 10:01:44 +0000 (12:01 +0200)
dns_rdata_tostruct doesn't need a mctx passed to it for SIG (the signer
is already expanded at this point). About the only time when mctx is
needed is when the structure is to be used after the rdata has been
destroyed.

(cherry picked from commit d6ad56bd9e98382f8bd41a25756efdbbc3e39bd9)

lib/dns/message.c

index dfa5891ba024440341abb1df01d871e6edde282d..5d71c6ae991458207f6e1e66ad5677f96f6cd2b2 100644 (file)
@@ -3212,7 +3212,7 @@ 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);
                }