mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
coverity #1486531: return error properly from x509_pubkey_ex_new_ex()
Reviewed-by: Ben Kaduk <kaduk@mit.edu> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15942)
This commit is contained in:
parent
69e14a546d
commit
475c5bbd10
@ -116,6 +116,7 @@ static int x509_pubkey_ex_new_ex(ASN1_VALUE **pval, const ASN1_ITEM *it,
|
||||
|| !x509_pubkey_ex_populate((ASN1_VALUE **)&ret, NULL)
|
||||
|| !x509_pubkey_set0_libctx(ret, libctx, propq)) {
|
||||
x509_pubkey_ex_free((ASN1_VALUE **)&ret, NULL);
|
||||
ret = NULL;
|
||||
ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
|
||||
} else {
|
||||
*pval = (ASN1_VALUE *)ret;
|
||||
|
Loading…
Reference in New Issue
Block a user