mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 13:10:52 +02:00
Fix minor compile error with WOLFSSL_DEBUG_MEMORY
This commit is contained in:
@@ -1184,14 +1184,13 @@ void wolfSSL_Free(void *ptr, void* heap, int type)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
wc_Memory* pt = NULL;
|
||||
|
||||
if (ptr) {
|
||||
/* check for testing heap hint was set */
|
||||
#ifdef WOLFSSL_HEAP_TEST
|
||||
if (heap == (void*)WOLFSSL_HEAP_TEST) {
|
||||
#ifdef WOLFSSL_DEBUG_MEMORY
|
||||
fprintf(stderr, "[HEAP %p] Free: %p at %s:%u\n", heap, pt, func,
|
||||
fprintf(stderr, "[HEAP %p] Free: %p at %s:%u\n", heap, ptr, func,
|
||||
line);
|
||||
#endif
|
||||
return free(ptr); /* native heap */
|
||||
@@ -1211,7 +1210,7 @@ void wolfSSL_Free(void *ptr, void* heap, int type)
|
||||
#endif
|
||||
#ifndef WOLFSSL_NO_MALLOC
|
||||
#ifdef WOLFSSL_DEBUG_MEMORY
|
||||
fprintf(stderr, "[HEAP %p] Free: %p at %s:%u\n", heap, pt, func,
|
||||
fprintf(stderr, "[HEAP %p] Free: %p at %s:%u\n", heap, ptr, func,
|
||||
line);
|
||||
#endif
|
||||
#ifdef FREERTOS
|
||||
@@ -1228,6 +1227,7 @@ void wolfSSL_Free(void *ptr, void* heap, int type)
|
||||
else {
|
||||
WOLFSSL_HEAP_HINT* hint = (WOLFSSL_HEAP_HINT*)heap;
|
||||
WOLFSSL_HEAP* mem;
|
||||
wc_Memory* pt;
|
||||
word32 padSz = -(int)sizeof(wc_Memory) & (WOLFSSL_STATIC_ALIGN - 1);
|
||||
|
||||
if (hint == NULL) {
|
||||
@@ -1323,7 +1323,6 @@ void wolfSSL_Free(void *ptr, void* heap, int type)
|
||||
}
|
||||
|
||||
(void)i;
|
||||
(void)pt;
|
||||
(void)type;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user