diff options
-rw-r--r-- | libs/binder/Parcel.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index cf22e58..1aaee92 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -173,15 +173,14 @@ static void release_object(const sp<ProcessState>& proc, return; } case BINDER_TYPE_FD: { - if (outAshmemSize != NULL) { - if (obj.cookie != 0) { + if (obj.cookie != 0) { // owned + if (outAshmemSize != NULL) { int size = ashmem_get_size_region(obj.handle); if (size > 0) { *outAshmemSize -= size; } - - close(obj.handle); } + close(obj.handle); #ifdef DISABLE_ASHMEM_TRACKING } else if (obj.cookie != 0) { close(obj.handle); |