mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #7805 from julek-wolfssl/wolfSSL_X509_REQ_add1_attr_by_NID-push-cleanup
wolfSSL_X509_REQ_add1_attr_by_NID: clean up push call for analyzers
This commit is contained in:
@ -14510,11 +14510,12 @@ int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
|||||||
req->reqAttributes->type = STACK_TYPE_X509_REQ_ATTR;
|
req->reqAttributes->type = STACK_TYPE_X509_REQ_ATTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = wolfSSL_sk_push(req->reqAttributes, attr);
|
if (req->reqAttributes->type == STACK_TYPE_X509_REQ_ATTR)
|
||||||
if ((ret != WOLFSSL_SUCCESS) || (req->reqAttributes->type == STACK_TYPE_CIPHER)) {
|
ret = wolfSSL_sk_push(req->reqAttributes, attr);
|
||||||
/* CIPHER type makes a copy */
|
else
|
||||||
|
ret = WOLFSSL_FAILURE;
|
||||||
|
if (ret != WOLFSSL_SUCCESS)
|
||||||
wolfSSL_X509_ATTRIBUTE_free(attr);
|
wolfSSL_X509_ATTRIBUTE_free(attr);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user