projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27f3727
)
evp: fix coverity 1473378: unchecked return value
author
Pauli
<ppzgs1@gmail.com>
Thu, 18 Mar 2021 23:43:24 +0000
(09:43 +1000)
committer
Pauli
<pauli@openssl.org>
Thu, 25 Mar 2021 22:46:02 +0000
(08:46 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14615)
crypto/evp/p_lib.c
patch
|
blob
|
history
diff --git
a/crypto/evp/p_lib.c
b/crypto/evp/p_lib.c
index 4abecdf30c356629632e80754c9c28bfd11eaf12..94a83c48041384295cf59491f71fa6374052aa08 100644
(file)
--- a/
crypto/evp/p_lib.c
+++ b/
crypto/evp/p_lib.c
@@
-846,8
+846,9
@@
static const ECX_KEY *evp_pkey_get0_ECX_KEY(const EVP_PKEY *pkey, int type)
static ECX_KEY *evp_pkey_get1_ECX_KEY(EVP_PKEY *pkey, int type)
{
ECX_KEY *ret = (ECX_KEY *)evp_pkey_get0_ECX_KEY(pkey, type);
- if (ret != NULL)
- ossl_ecx_key_up_ref(ret);
+
+ if (ret != NULL && !ossl_ecx_key_up_ref(ret))
+ ret = NULL;
return ret;
}