]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
x509: fix coverity 1474470: NULL pointer dereference
authorPauli <pauli@openssl.org>
Mon, 29 Mar 2021 02:29:10 +0000 (12:29 +1000)
committerTomas Mraz <tomas@openssl.org>
Tue, 30 Mar 2021 16:57:29 +0000 (18:57 +0200)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14716)

crypto/x509/x509_att.c

index 52cad9a047277d9f4b9d6c536d4a9d34b1d2cdfd..e7ed1899581d4dc1d93138dfaadc09cc23c9128d 100644 (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) {