diff options
| author | 2023-05-18 19:29:02 +0000 | |
|---|---|---|
| committer | 2023-05-18 23:12:26 +0000 | |
| commit | e43d0d0159494220aa67bf47eff45788b52987d6 (patch) | |
| tree | c6c672498ed8f1d18f731fefbdb93c1277a6ad15 /libs | |
| parent | 855810c4e9c2e03d025d47f75ba199586af791d5 (diff) | |
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
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/MemoryHeapBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp index 8fe1d2bb3d..3da06ba4db 100644 --- a/libs/binder/MemoryHeapBase.cpp +++ b/libs/binder/MemoryHeapBase.cpp @@ -78,7 +78,7 @@ MemoryHeapBase::MemoryHeapBase(size_t size, uint32_t flags, char const * name) 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); |