From 6e24e21d5a48a92963579e1e48488e7424ca90a3 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 24 Feb 2022 12:56:39 -0800 Subject: [PATCH] Fix for heap pointer in `wolfSSL_DupSession`. --- src/ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 9e3a83039..7df0b69ff 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -24095,10 +24095,10 @@ int wolfSSL_DupSession(const WOLFSSL_SESSION* input, WOLFSSL_SESSION* output, } else { tmp = (byte*)XREALLOC(ticBuff, input->ticketLen, - output->heap, DYNAMIC_TYPE_SESSION_TICK); + input->heap, DYNAMIC_TYPE_SESSION_TICK); if (tmp == NULL) { WOLFSSL_MSG("Failed to allocate memory for ticket"); - XFREE(ticBuff, ssl->heap, DYNAMIC_TYPE_SESSION_TICK); + XFREE(ticBuff, input->heap, DYNAMIC_TYPE_SESSION_TICK); output->ticket = NULL; output->ticketLen = 0; output->ticketLenAlloc = 0;