summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2016-02-05 17:37:49 -0500
committerRich Salz <rsalz@openssl.org>2016-02-06 09:25:54 -0500
commit69ac182d15e964801a237f826d71fd4d77b4710f (patch)
tree530ffe5ddbc998fdd111b847d6c3778711cc18e5 /apps/req.c
parent0d1e003f8493504945dabff4384cfafba49f5369 (diff)
GH634: fix potential memory leak
Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/req.c b/apps/req.c
index eddbc77839..d6d46a95ff 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -1451,6 +1451,7 @@ static EVP_PKEY_CTX *set_keygen_ctx(const char *gstr,
if (EVP_PKEY_keygen_init(gctx) <= 0) {
BIO_puts(bio_err, "Error initializing keygen context\n");
ERR_print_errors(bio_err);
+ EVP_PKEY_CTX_free(gctx);
return NULL;
}
#ifndef OPENSSL_NO_RSA