VFS: Fix unmapping order on Win32
Vicki Pfau vi@endrift.com
Sat, 08 Feb 2020 13:34:38 -0800
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/util/vfs/vfs-fd.c
→
src/util/vfs/vfs-fd.c
@@ -170,12 +170,12 @@ struct VFileFD* vfd = (struct VFileFD*) vf;
size_t i; for (i = 0; i < HandleMappingListSize(&vfd->handles); ++i) { if (HandleMappingListGetPointer(&vfd->handles, i)->mapping == memory) { + UnmapViewOfFile(memory); CloseHandle(HandleMappingListGetPointer(&vfd->handles, i)->handle); HandleMappingListShift(&vfd->handles, i, 1); break; } } - UnmapViewOfFile(memory); } #endif