Skip to content

Commit f4bc468

Browse files
authored
dont try to release mapping if VirtualAlloc fails (#116794)
1 parent 76490ed commit f4bc468

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/coreclr/minipal/Windows/doublemapping.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ bool VMToOSInterface::ReleaseDoubleMappedMemory(void *mapperHandle, void* pStart
193193
{
194194
LPVOID result = VirtualAlloc(pStart, size, MEM_COMMIT, PAGE_READWRITE);
195195
assert(result != NULL);
196+
if (result == NULL)
197+
{
198+
return false;
199+
}
196200
memset(pStart, 0, size);
197201
return UnmapViewOfFile(pStart);
198202
}

0 commit comments

Comments
 (0)