From: Pauli Date: Sun, 26 Apr 2020 23:17:48 +0000 (+1000) Subject: coverity 1462573 Dereference after null check X-Git-Tag: openssl-3.0.0-alpha2~114 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5e12a13af7413d301e8e781e4f8e3e9b953f0df5;p=oweals%2Fopenssl.git coverity 1462573 Dereference after null check Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11651) --- diff --git a/crypto/evp/pmeth_gn.c b/crypto/evp/pmeth_gn.c index dbc6c914e7..dc1dad86ba 100644 --- a/crypto/evp/pmeth_gn.c +++ b/crypto/evp/pmeth_gn.c @@ -93,7 +93,7 @@ static int gen_init(EVP_PKEY_CTX *ctx, int operation) #endif end: - if (ret <= 0) + if (ret <= 0 && ctx != NULL) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret;