From 2366718d5a484aeb9dce7907f302a471d778774d Mon Sep 17 00:00:00 2001 From: Kareem Date: Wed, 11 Jun 2025 16:36:53 -0700 Subject: [PATCH] Add args->input free in FreeSskeArgs. This free is redundant in most cases but it covers the specific case of using async, exiting SendServerKeyExchange early due to WANT_WRITE or WC_PENDING_E, then later freeing the async context without calling SendServerKeyExchange again. --- src/internal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/internal.c b/src/internal.c index e7f2103c8..0edd4f226 100644 --- a/src/internal.c +++ b/src/internal.c @@ -35727,6 +35727,16 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, XFREE(args->verifySig, ssl->heap, DYNAMIC_TYPE_SIGNATURE); args->verifySig = NULL; #endif + + if ( + #ifdef WOLFSSL_ASYNC_IO + args != NULL && + #endif + args->input != NULL) { + XFREE(args->input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER); + args->input = NULL; + } + (void)args; }