From d0ea0eb331176bf5882e31c8cf2538af16ef76cb Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 29 Mar 2021 12:29:10 +1000 Subject: [PATCH] x509: fix coverity 1474470: NULL pointer dereference Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14716) --- crypto/x509/x509_att.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c index 52cad9a0472..e7ed1899581 100644 --- a/crypto/x509/x509_att.c +++ b/crypto/x509/x509_att.c @@ -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) { -- 2.47.2