From f48fd9595d380a41b76e09456b1d5eced2777eee Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 6 Apr 2026 13:53:11 -0500 Subject: [PATCH 1/2] test_pkcs7: use XFREE instead of free. --- tests/api/test_pkcs7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/api/test_pkcs7.c b/tests/api/test_pkcs7.c index 3cfb22e8ea..0425d64373 100644 --- a/tests/api/test_pkcs7.c +++ b/tests/api/test_pkcs7.c @@ -4718,7 +4718,7 @@ int test_wc_PKCS7_DecodeCompressedData(void) XFREE(decompressed, heap, DYNAMIC_TYPE_TMP_BUFFER); if (cert_buf != NULL) - free(cert_buf); + XFREE(cert_buf, NULL, DYNAMIC_TYPE_TMP_BUFFER); wc_PKCS7_Free(pkcs7); #endif return EXPECT_RESULT(); From 01689b837fa1094cf5b2924789550ed84b5e1b3a Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 6 Apr 2026 14:00:08 -0500 Subject: [PATCH 2/2] tests api: use XFREE instead of free in dual_alg tests. --- tests/api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/api.c b/tests/api.c index 8f561b0648..fbe9cae3d4 100644 --- a/tests/api.c +++ b/tests/api.c @@ -1444,7 +1444,7 @@ static int test_dual_alg_crit_ext_support(void) XFREE(root, NULL, DYNAMIC_TYPE_TMP_BUFFER); XFREE(server, NULL, DYNAMIC_TYPE_TMP_BUFFER); - free(serverKey); + XFREE(serverKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); return EXPECT_RESULT(); } @@ -1519,7 +1519,7 @@ static int test_dual_alg_support(void) XFREE(root, NULL, DYNAMIC_TYPE_TMP_BUFFER); XFREE(server, NULL, DYNAMIC_TYPE_TMP_BUFFER); - free(serverKey); + XFREE(serverKey, NULL, DYNAMIC_TYPE_TMP_BUFFER); return EXPECT_RESULT(); }