summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-04-27 09:19:11 +1000
committerPauli <paul.dale@oracle.com>2020-04-30 20:21:33 +1000
commitba61a0e60ff8d645d41e0bf4d65e753adca18b24 (patch)
tree8b77b606af2877517f1a1d5176c31a661f4a5619 /providers
parent5e12a13af7413d301e8e781e4f8e3e9b953f0df5 (diff)
coverity 1462574 Resource leak
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11651)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/keymgmt/rsa_kmgmt.c1
1 files changed, 1 insertions, 0 deletions
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;