Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wolfcrypt/src/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void wc_MemFailCount_Init(void)
mem_fail_cnt = atoi(cnt);
}
}
static int wc_MemFailCount_AllocMem(void)
int wc_MemFailCount_AllocMem(void)
{
int ret = 1;

Expand All @@ -177,15 +177,15 @@ static int wc_MemFailCount_AllocMem(void)
* allocator via wolfSSL_SetAllocators(), or a genuine out-of-memory). No
* block exists to be freed, so undo the count to keep Total (allocs)
* balanced with Frees. */
static void wc_MemFailCount_AllocFailed(void)
void wc_MemFailCount_AllocFailed(void)
{
wc_LockMutex(&memFailMutex);
if (mem_fail_allocs > 0) {
mem_fail_allocs--;
}
wc_UnLockMutex(&memFailMutex);
}
static void wc_MemFailCount_FreeMem(void)
void wc_MemFailCount_FreeMem(void)
{
wc_LockMutex(&memFailMutex);
mem_fail_frees++;
Expand Down
3 changes: 3 additions & 0 deletions wolfssl/wolfcrypt/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ WOLFSSL_API int wolfSSL_GetAllocators(wolfSSL_Malloc_cb* mf,
#ifdef WOLFSSL_MEM_FAIL_COUNT
WOLFSSL_LOCAL void wc_MemFailCount_Init(void);
WOLFSSL_LOCAL void wc_MemFailCount_Free(void);
WOLFSSL_LOCAL int wc_MemFailCount_AllocMem(void);
WOLFSSL_LOCAL void wc_MemFailCount_AllocFailed(void);
WOLFSSL_LOCAL void wc_MemFailCount_FreeMem(void);
#endif

#ifdef WOLFSSL_CHECK_MEM_ZERO
Expand Down
Loading