diff options
author | Chih-Wei Huang <cwhuang@linux.org.tw> | 2016-07-08 19:05:26 +0800 |
---|---|---|
committer | Chih-Wei Huang <cwhuang@linux.org.tw> | 2016-07-08 19:05:26 +0800 |
commit | 04bc5f086acd71dc06d0a1d9017c973d5ee837bd (patch) | |
tree | 46b2a1f5b9f927a876b7a3ddfcfbf694fc5bcbdf | |
parent | 653ceea3f45b2827326b86554d7710e968a6a464 (diff) | |
parent | 54cb02ad733fb71b1bdf78590428817fb780aff8 (diff) | |
download | frameworks_native-04bc5f086acd71dc06d0a1d9017c973d5ee837bd.zip frameworks_native-04bc5f086acd71dc06d0a1d9017c973d5ee837bd.tar.gz frameworks_native-04bc5f086acd71dc06d0a1d9017c973d5ee837bd.tar.bz2 |
Merge tag 'android-6.0.1_r52' into marshmallow-x86
Android 6.0.1 Release 52 (MOB30R)
-rw-r--r-- | libs/binder/Parcel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 22d7ef3..4a660d1 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -1377,7 +1377,13 @@ native_handle* Parcel::readNativeHandle() const for (int i=0 ; err==NO_ERROR && i<numFds ; i++) { h->data[i] = dup(readFileDescriptor()); - if (h->data[i] < 0) err = BAD_VALUE; + if (h->data[i] < 0) { + for (int j = 0; j < i; j++) { + close(h->data[j]); + } + native_handle_delete(h); + return 0; + } } err = read(h->data + numFds, sizeof(int)*numInts); if (err != NO_ERROR) { |