x509: fix coverity 1474470: NULL pointer dereference

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14716)
This commit is contained in:
Pauli 2021-03-29 12:29:10 +10:00 committed by Tomas Mraz
parent 0391553485
commit d0ea0eb331

View File

@ -79,7 +79,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x,
if (x == NULL) {
ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
goto err2;
return NULL;
}
if (*x == NULL) {