From 589b9eb4bf03025fb9028046074ea071d60f9728 Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Fri, 21 Aug 2026 16:50:11 -0600 Subject: [PATCH] Free the unexpected return in test_wolfSSL_load_client_CA_file --- tests/api/test_ssl_cert.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/api/test_ssl_cert.c b/tests/api/test_ssl_cert.c index 22cdc54803..b37fb6fb63 100644 --- a/tests/api/test_ssl_cert.c +++ b/tests/api/test_ssl_cert.c @@ -963,7 +963,9 @@ int test_wolfSSL_load_client_CA_file(void) WOLF_STACK_OF(WOLFSSL_X509_NAME)* names = NULL; /* A file that cannot be opened reports no names. */ - ExpectNull(wolfSSL_load_client_CA_file("does/not/exist.pem")); + ExpectNull(names = wolfSSL_load_client_CA_file("does/not/exist.pem")); + wolfSSL_sk_X509_NAME_pop_free(names, NULL); + names = NULL; /* Every certificate in the file contributes its subject name. */ ExpectNotNull(names = wolfSSL_load_client_CA_file(caCertFile));