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