forked from wolfSSL/wolfssl
cleanup memory on structure free
This commit is contained in:
@@ -4012,7 +4012,7 @@ void FreeX509(WOLFSSL_X509* x509)
|
|||||||
#endif /* OPENSSL_ALL */
|
#endif /* OPENSSL_ALL */
|
||||||
#if defined(WOLFSSL_CERT_REQ) && defined(OPENSSL_ALL)
|
#if defined(WOLFSSL_CERT_REQ) && defined(OPENSSL_ALL)
|
||||||
if (x509->reqAttributes) {
|
if (x509->reqAttributes) {
|
||||||
wolfSSL_sk_free(x509->reqAttributes);
|
wolfSSL_sk_pop_free(x509->reqAttributes, NULL);
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_CERT_REQ */
|
#endif /* WOLFSSL_CERT_REQ */
|
||||||
if (x509->altNames) {
|
if (x509->altNames) {
|
||||||
|
@@ -12342,6 +12342,7 @@ int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
|||||||
else {
|
else {
|
||||||
if (req->reqAttributes == NULL) {
|
if (req->reqAttributes == NULL) {
|
||||||
req->reqAttributes = wolfSSL_sk_new_node(req->heap);
|
req->reqAttributes = wolfSSL_sk_new_node(req->heap);
|
||||||
|
req->reqAttributes->type = STACK_TYPE_X509_REQ_ATTR;
|
||||||
}
|
}
|
||||||
ret = wolfSSL_sk_push(req->reqAttributes, attr);
|
ret = wolfSSL_sk_push(req->reqAttributes, attr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user