Skip to content

Commit 7ef560c

Browse files
committed
Fix build error with memtest and memorylog
1 parent 2f2d5b3 commit 7ef560c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wolfcrypt/src/memory.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ void *xmalloc(size_t n, void* heap, int type, const char* func,
15491549
#endif
15501550

15511551
if (malloc_function) {
1552-
#ifndef WOLFSSL_STATIC_MEMORY
1552+
#if !defined(WOLFSSL_STATIC_MEMORY) && !defined(WOLFSSL_DEBUG_MEMORY)
15531553
p32 = malloc_function(n + sizeof(word32) * 4);
15541554
#else
15551555
p32 = malloc_function(n + sizeof(word32) * 4, heap, type);
@@ -1592,7 +1592,7 @@ void *xrealloc(void *p, size_t n, void* heap, int type, const char* func,
15921592
}
15931593

15941594
if (realloc_function) {
1595-
#ifndef WOLFSSL_STATIC_MEMORY
1595+
#if !defined(WOLFSSL_STATIC_MEMORY) && !defined(WOLFSSL_DEBUG_MEMORY)
15961596
p32 = realloc_function(oldp32, n + sizeof(word32) * 4);
15971597
#else
15981598
p32 = realloc_function(oldp32, n + sizeof(word32) * 4, heap, type);
@@ -1638,7 +1638,7 @@ void xfree(void *p, void* heap, int type, const char* func, const char* file,
16381638
func, file, line);
16391639

16401640
if (free_function) {
1641-
#ifndef WOLFSSL_STATIC_MEMORY
1641+
#if !defined(WOLFSSL_STATIC_MEMORY) && !defined(WOLFSSL_DEBUG_MEMORY)
16421642
free_function(p32);
16431643
#else
16441644
free_function(p32, heap, type);

0 commit comments

Comments
 (0)