From dc345553dfc21a440a88adb702d53011615b3db1 Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Mon, 14 Jul 2025 17:07:58 -0600 Subject: [PATCH] wrap res assignment in else statement --- wolfcrypt/src/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/memory.c b/wolfcrypt/src/memory.c index 17663b3e0..5df4d15fc 100644 --- a/wolfcrypt/src/memory.c +++ b/wolfcrypt/src/memory.c @@ -1376,7 +1376,9 @@ void* wolfSSL_Realloc(void *ptr, size_t size, void* heap, int type) WOLFSSL_MSG("Error IO memory was not large enough"); res = NULL; /* return NULL in error case */ } - res = pt->buffer; + else { + res = pt->buffer; + } } else #endif