From: Pauli Date: Sun, 26 Apr 2020 23:19:11 +0000 (+1000) Subject: coverity 1462574 Resource leak X-Git-Tag: openssl-3.0.0-alpha2~113 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ba61a0e60ff8d645d41e0bf4d65e753adca18b24;p=oweals%2Fopenssl.git coverity 1462574 Resource leak Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11651) --- diff --git a/providers/implementations/keymgmt/rsa_kmgmt.c b/providers/implementations/keymgmt/rsa_kmgmt.c index 3bf175b752..181df998ad 100644 --- a/providers/implementations/keymgmt/rsa_kmgmt.c +++ b/providers/implementations/keymgmt/rsa_kmgmt.c @@ -376,6 +376,7 @@ static void *rsa_gen_init(void *provctx, int selection) if ((gctx->pub_exp = BN_new()) == NULL || !BN_set_word(gctx->pub_exp, RSA_F4)) { BN_free(gctx->pub_exp); + OPENSSL_free(gctx); gctx = NULL; } else { gctx->nbits = 2048;