Skip to content

Commit e6af5bc

Browse files
authored
Merge pull request wolfSSL#9353 from embhorn/gh9347
Build errors in memtest config and sniffer
2 parents a1d000c + 7ef560c commit e6af5bc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/sniffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7349,8 +7349,8 @@ static int addSecretNode(unsigned char* clientRandom,
73497349

73507350
XMEMCPY(node->clientRandom, clientRandom, CLIENT_RANDOM_LENGTH);
73517351
XMEMCPY(node->secrets[type], secret, SECRET_LENGTH);
7352-
node->next = secretHashTable[index];
7353-
secretHashTable[index] = node;
7352+
node->next = secretHashTable[idx];
7353+
secretHashTable[idx] = node;
73547354

73557355
unlockReturn:
73567356

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)