]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Free 'rsa' if 'e' is NULL in opensslrsa_verify2
authorMark Andrews <marka@isc.org>
Mon, 26 Sep 2022 01:51:05 +0000 (11:51 +1000)
committerMark Andrews <marka@isc.org>
Tue, 27 Sep 2022 23:24:34 +0000 (09:24 +1000)
lib/dns/opensslrsa_link.c

index 4d8c29ea899fa018bd47378fbf883456f1398622..3c72441727ed23a00bec8f45789838ff0c492f7a 100644 (file)
@@ -202,6 +202,7 @@ opensslrsa_verify2(dst_context_t *dctx, int maxbits, const isc_region_t *sig) {
        }
        RSA_get0_key(rsa, NULL, &e, NULL);
        if (e == NULL) {
+               RSA_free(rsa);
                return (dst__openssl_toresult(DST_R_VERIFYFAILURE));
        }
        bits = BN_num_bits(e);