diff options
Diffstat (limited to 'thirdparty/openssl/crypto/evp/pmeth_gn.c')
-rw-r--r-- | thirdparty/openssl/crypto/evp/pmeth_gn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/thirdparty/openssl/crypto/evp/pmeth_gn.c b/thirdparty/openssl/crypto/evp/pmeth_gn.c index 6435f1b632..6a4d3573ff 100644 --- a/thirdparty/openssl/crypto/evp/pmeth_gn.c +++ b/thirdparty/openssl/crypto/evp/pmeth_gn.c @@ -149,8 +149,10 @@ int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) if (!ppkey) return -1; - if (!*ppkey) + if (*ppkey == NULL) *ppkey = EVP_PKEY_new(); + if (*ppkey == NULL) + return -1; ret = ctx->pmeth->keygen(ctx, *ppkey); if (ret <= 0) { |