Commit 01f879d3 authored by David Benjamin's avatar David Benjamin Committed by Kurt Roeckx
Browse files

Don't check for malloc failure twice.



a03f81f4 added a malloc failure check to
EVP_PKEY_keygen, but there already was one.

Signed-off-by: default avatarKurt Roeckx <kurt@roeckx.be>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>

GH: #1473
parent 67e11f1d
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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);