]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Free 'n' on error path in rsa_check
authorMark Andrews <marka@isc.org>
Mon, 26 Sep 2022 02:05:33 +0000 (12:05 +1000)
committerMark Andrews <marka@isc.org>
Tue, 27 Sep 2022 23:24:34 +0000 (09:24 +1000)
lib/dns/opensslrsa_link.c

index ce40ab1c318d700c8f072e89ed4649c798793536..2895ce28ceda9c4714b857fe25b0e46844086af7 100644 (file)
@@ -999,6 +999,9 @@ rsa_check(RSA *rsa, RSA *pub) {
                }
                if (e1 != NULL) {
                        if (BN_cmp(e1, e2) != 0) {
+                               if (n != NULL) {
+                                       BN_free(n);
+                               }
                                return (DST_R_INVALIDPRIVATEKEY);
                        }
                } else {