commit | e43d0d0159494220aa67bf47eff45788b52987d6 | [log] [tgz] |
---|---|---|
author | zijunzhao <zijunzhao@google.com> | Thu May 18 19:29:02 2023 +0000 |
committer | Zijun Zhao <zijunzhao@google.com> | Thu May 18 23:12:26 2023 +0000 |
tree | c6c672498ed8f1d18f731fefbdb93c1277a6ad15 | |
parent | 855810c4e9c2e03d025d47f75ba199586af791d5 [diff] [blame] |
Fix -Wnullable-to-nonnull-conversion error Fix the build errors like https://android-build.googleplex.com/builds/pending/P56005836/aosp_arm64-userdebug/latest/view/logs/build.log Bugs: b/245972273 Test: mm -j Change-Id: I8edeace5afddc2cf6783899c889a3f2a542156a3
diff --git a/libs/binder/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp index 8fe1d2b..3da06ba 100644 --- a/libs/binder/MemoryHeapBase.cpp +++ b/libs/binder/MemoryHeapBase.cpp
@@ -78,7 +78,7 @@ if (SEAL_FLAGS && (fcntl(fd, F_ADD_SEALS, SEAL_FLAGS) == -1)) { ALOGE("MemoryHeapBase: MemFD %s sealing with flags %x failed with error %s", name, SEAL_FLAGS, strerror(errno)); - munmap(mBase, mSize); + if (mNeedUnmap) munmap(mBase, mSize); mBase = nullptr; mSize = 0; close(fd);