diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-04-27 20:07:22 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2013-04-27 20:07:22 +0200 |
commit | 20d6f2013b6629566b3fe1b5b03800fecac25e96 (patch) | |
tree | fe5ab6960b3b80b47a2cd2f5221711d221f0a37f /src/leveldb/util | |
parent | 67efbda4a22dcf0868df18cc1280ffa6a33d0ecd (diff) |
Checking whether closing succeeds
Diffstat (limited to 'src/leveldb/util')
-rw-r--r-- | src/leveldb/util/env_win.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leveldb/util/env_win.cc b/src/leveldb/util/env_win.cc index c64027f674..4730192bf8 100644 --- a/src/leveldb/util/env_win.cc +++ b/src/leveldb/util/env_win.cc @@ -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; |