Merge pull request #7737 from JacobBarthelmeh/staticmemory-singlethreaded

fix for staticmemory and singlethreaded build
This commit is contained in:
Sean Parkinson
2024-07-11 09:57:08 +10:00
committed by GitHub
2 changed files with 26 additions and 0 deletions

View File

@@ -793,9 +793,13 @@ int wc_LoadStaticMemory(WOLFSSL_HEAP_HINT** pHint,
void wc_UnloadStaticMemory(WOLFSSL_HEAP_HINT* heap)
{
WOLFSSL_ENTER("wc_UnloadStaticMemory");
#ifndef SINGLE_THREADED
if (heap != NULL && heap->memory != NULL) {
wc_FreeMutex(&heap->memory->memory_mutex);
}
#else
(void)heap;
#endif
}
#ifndef WOLFSSL_STATIC_MEMORY_LEAN