From 69ac182d15e964801a237f826d71fd4d77b4710f Mon Sep 17 00:00:00 2001 From: Insu Yun Date: Fri, 5 Feb 2016 17:37:49 -0500 Subject: [PATCH] GH634: fix potential memory leak Signed-off-by: Rich Salz Reviewed-by: Kurt Roeckx --- apps/req.c | 1 + 1 file changed, 1 insertion(+) 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 -- 2.25.1