diff options
author | 2024-08-28 21:42:36 +0000 | |
---|---|---|
committer | 2024-08-28 21:42:36 +0000 | |
commit | bdb7799b152d0485c411ceb1a62b8b32065f5d0c (patch) | |
tree | aef1f3b768634ae6f84126cd104dee901adf8d1e | |
parent | 34a6429eb3d3e4616b5c62fa2656c45f7e98909c (diff) | |
parent | a98256f74c117b1e925fbd42dda666226cf657c3 (diff) |
Merge "Mark the return of munmap() as unused." into main am: 7153373983 am: a98256f74c
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3244900
Change-Id: I9e41d70050343ab05e6ba2821f530a8eaa773ae4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | libs/binder/Parcel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index e8fe555ab3..4b7af45739 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -1725,7 +1725,9 @@ status_t Parcel::writeBlob(size_t len, bool mutableCopy, WritableBlob* outBlob) } } } - ::munmap(ptr, len); + if (::munmap(ptr, len) == -1) { + ALOGW("munmap() failed: %s", strerror(errno)); + } } ::close(fd); return status; @@ -3332,7 +3334,9 @@ Parcel::Blob::~Blob() { void Parcel::Blob::release() { if (mFd != -1 && mData) { - ::munmap(mData, mSize); + if (::munmap(mData, mSize) == -1) { + ALOGW("munmap() failed: %s", strerror(errno)); + } } clear(); } |