From 4e5a98e65ddf8f918596a5fe27f2572488222ed8 Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Wed, 15 May 2024 14:03:12 -0500 Subject: [PATCH] Fix from rebase --- wolfcrypt/src/memory.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index 43f9861b9d..7fd8a019ab 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -1141,6 +1141,10 @@ void wolfSSL_Free(void *ptr, void* heap, int type) #endif } mem = hint->memory; + if (mem == NULL) { + WOLFSSL_MSG("Bad hint pointer to memory"); + return; + } /* get memory struct and add it to available list */ pt = (wc_Memory*)((byte*)ptr - sizeof(wc_Memory) - padSz);