From 5536ecf026151f1cdc80f6908fe8820e798dcd58 Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Tue, 24 Feb 2026 12:43:46 -0600 Subject: [PATCH] Fix issue from review --- tests/api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/api.c b/tests/api.c index 8b9d0a4ecd..298d999dbf 100644 --- a/tests/api.c +++ b/tests/api.c @@ -3554,6 +3554,9 @@ static int test_wolfSSL_add_to_chain_overflow(void) } ctx->certChain = fakeChain; } + else { + XFREE(fakeChain, ctx ? ctx->heap : NULL, DYNAMIC_TYPE_CERT); + } /* Try to add another cert - this MUST fail due to overflow guard. */ ExpectNotNull(x509 = wolfSSL_X509_load_certificate_file(