diff options
author | 2024-08-28 21:33:26 +0000 | |
---|---|---|
committer | 2024-08-28 21:33:26 +0000 | |
commit | a98256f74c117b1e925fbd42dda666226cf657c3 (patch) | |
tree | e083b8dfea0a9dc2facf4ddc183107492201391a | |
parent | dfe2a2771c96cef2d6e29e3be8e4e712363b0470 (diff) | |
parent | 7153373983e86704d8f35914c4cefb8eadbd8aa4 (diff) |
Merge "Mark the return of munmap() as unused." into main am: 7153373983
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3244900
Change-Id: I7f6e76a0537355440cfbd7d71b0bf378d2d38dcb
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(); } |