Fix memory leak in x509_verify_cert itself, the failed certs need a pop_free call so the reference is properly decremented, as they are no longer in the X509_STORE.

This commit is contained in:
Kareem
2025-07-09 17:16:31 -07:00
parent 1e367597b6
commit 60c84744c8

View File

@@ -585,7 +585,7 @@ exit:
}
}
if (failedCerts) {
wolfSSL_sk_X509_free(failedCerts);
wolfSSL_sk_X509_pop_free(failedCerts, NULL);
}
/* Remove additional intermediates from init from the store */