mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
cleanup memory on structure free
This commit is contained in:
@@ -4012,7 +4012,7 @@ void FreeX509(WOLFSSL_X509* x509)
|
||||
#endif /* OPENSSL_ALL */
|
||||
#if defined(WOLFSSL_CERT_REQ) && defined(OPENSSL_ALL)
|
||||
if (x509->reqAttributes) {
|
||||
wolfSSL_sk_free(x509->reqAttributes);
|
||||
wolfSSL_sk_pop_free(x509->reqAttributes, NULL);
|
||||
}
|
||||
#endif /* WOLFSSL_CERT_REQ */
|
||||
if (x509->altNames) {
|
||||
|
@@ -12342,6 +12342,7 @@ int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
||||
else {
|
||||
if (req->reqAttributes == NULL) {
|
||||
req->reqAttributes = wolfSSL_sk_new_node(req->heap);
|
||||
req->reqAttributes->type = STACK_TYPE_X509_REQ_ATTR;
|
||||
}
|
||||
ret = wolfSSL_sk_push(req->reqAttributes, attr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user