diff options
author | Pauli <paul.dale@oracle.com> | 2020-04-27 09:17:48 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-04-30 20:21:33 +1000 |
commit | 5e12a13af7413d301e8e781e4f8e3e9b953f0df5 (patch) | |
tree | a109a94603c57ac22e50d701e6224757caaae089 /crypto/evp/pmeth_gn.c | |
parent | cb383f10d1fe5e9020280952caea4fa9c2e4139d (diff) |
coverity 1462573 Dereference after null check
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)
Diffstat (limited to 'crypto/evp/pmeth_gn.c')
-rw-r--r-- | crypto/evp/pmeth_gn.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |