Merge remote-tracking branch 'remotes/android-6.0.1_r52' into HEAD

Ticket: CYNGNOS-3020

Change-Id: I13076de5caf1546b8eef44417ee83cd9b2cb9d62
This commit is contained in:
Jessica Wagantall 2016-07-07 11:51:12 -07:00
commit cf27ee8089

View File

@ -1389,7 +1389,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) {