From 5e12a13af7413d301e8e781e4f8e3e9b953f0df5 Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 27 Apr 2020 09:17:48 +1000 Subject: [PATCH 1/1] coverity 1462573 Dereference after null check Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11651) --- crypto/evp/pmeth_gn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1