Fix leak of mapped zip central directories

am: d1531ac4e8

Change-Id: Iacc5d17b17cd05742e78650bde969ccbfa3b09c2
This commit is contained in:
Ryan Mitchell 2019-05-29 08:58:44 -07:00 committed by android-build-merger
commit fd84f60d45

View file

@ -76,7 +76,7 @@ MappedFile::~MappedFile() {
if (base_ != nullptr) UnmapViewOfFile(base_);
if (handle_ != nullptr) CloseHandle(handle_);
#else
if (base_ != nullptr) munmap(base_, size_);
if (base_ != nullptr) munmap(base_, size_ + offset_);
#endif
base_ = nullptr;