diff --git a/src/coreclr/minipal/Windows/doublemapping.cpp b/src/coreclr/minipal/Windows/doublemapping.cpp index f5f25f2bec92cc..0620a80477027d 100644 --- a/src/coreclr/minipal/Windows/doublemapping.cpp +++ b/src/coreclr/minipal/Windows/doublemapping.cpp @@ -193,6 +193,10 @@ bool VMToOSInterface::ReleaseDoubleMappedMemory(void *mapperHandle, void* pStart { LPVOID result = VirtualAlloc(pStart, size, MEM_COMMIT, PAGE_READWRITE); assert(result != NULL); + if (result == NULL) + { + return false; + } memset(pStart, 0, size); return UnmapViewOfFile(pStart); }