From: Insu Yun Date: Fri, 5 Feb 2016 22:37:49 +0000 (-0500) Subject: GH634: fix potential memory leak X-Git-Tag: OpenSSL_1_1_0-pre3~233 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=69ac182d15e964801a237f826d71fd4d77b4710f GH634: fix potential memory leak Signed-off-by: Rich Salz Reviewed-by: Kurt Roeckx --- 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