From 60c84744c866eb2f04bd9a70f02db260a3e11c07 Mon Sep 17 00:00:00 2001 From: Kareem Date: Wed, 9 Jul 2025 17:16:31 -0700 Subject: [PATCH] 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. --- src/x509_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x509_str.c b/src/x509_str.c index 50b029794..5670135fa 100644 --- a/src/x509_str.c +++ b/src/x509_str.c @@ -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 */