From: David Benjamin Date: Sat, 20 Aug 2016 17:55:17 +0000 (-0400) Subject: Don't check for malloc failure twice. X-Git-Tag: OpenSSL_1_0_2i~54 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=01f879d3e3fe5bdcf290b802a3c44a2bdde2b059;p=oweals%2Fopenssl.git Don't check for malloc failure twice. a03f81f4ead24c234dc26e388d86a352685f3948 added a malloc failure check to EVP_PKEY_keygen, but there already was one. Signed-off-by: Kurt Roeckx Reviewed-by: Rich Salz GH: #1473 --- diff --git a/crypto/evp/pmeth_gn.c b/crypto/evp/pmeth_gn.c index 6d7b5d7242..6a4d3573ff 100644 --- a/crypto/evp/pmeth_gn.c +++ b/crypto/evp/pmeth_gn.c @@ -154,11 +154,6 @@ int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) if (*ppkey == NULL) return -1; - if (*ppkey == NULL) { - EVPerr(EVP_F_EVP_PKEY_KEYGEN, ERR_R_MALLOC_FAILURE); - return -1; - } - ret = ctx->pmeth->keygen(ctx, *ppkey); if (ret <= 0) { EVP_PKEY_free(*ppkey);