Skip to content

Commit

Permalink
Checking whether closing succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Aug 17, 2013
1 parent d5317e8 commit cb8e3f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/env_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ bool Win32MapFile::_UnmapCurrentRegion()
// Defer syncing this data until next Sync() call, if any
_pending_sync = true;
}
UnmapViewOfFile(_base);
CloseHandle(_base_handle);
if (!UnmapViewOfFile(_base) || !CloseHandle(_base_handle))
result = false;
_file_offset += _limit - _base;
_base = NULL;
_base_handle = NULL;
Expand Down

0 comments on commit cb8e3f7

Please sign in to comment.