diff options
Diffstat (limited to 'src/dex_file.cc')
| -rw-r--r-- | src/dex_file.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/dex_file.cc b/src/dex_file.cc index f18b21556e..3ba671e23e 100644 --- a/src/dex_file.cc +++ b/src/dex_file.cc @@ -96,9 +96,7 @@ const DexFile* DexFile::Open(const std::string& filename, } void DexFile::ChangePermissions(int prot) const { - if (mprotect(mem_map_->Begin(), mem_map_->Size(), prot) != 0) { - PLOG(FATAL) << "Failed to change dex file permissions to " << prot << " for " << GetLocation(); - } + mem_map_->Protect(prot); } const DexFile* DexFile::OpenFile(const std::string& filename, |