Skip to content

Commit cb8e3f7

Browse files
committed
Checking whether closing succeeds
1 parent d5317e8 commit cb8e3f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/env_win.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ bool Win32MapFile::_UnmapCurrentRegion()
462462
// Defer syncing this data until next Sync() call, if any
463463
_pending_sync = true;
464464
}
465-
UnmapViewOfFile(_base);
466-
CloseHandle(_base_handle);
465+
if (!UnmapViewOfFile(_base) || !CloseHandle(_base_handle))
466+
result = false;
467467
_file_offset += _limit - _base;
468468
_base = NULL;
469469
_base_handle = NULL;

0 commit comments

Comments
 (0)