OSDN Git Service

Fix a leak in Parcel::writeBlob.
authorJeff Brown <jeffbrown@google.com>
Sat, 5 Nov 2011 02:01:44 +0000 (19:01 -0700)
committerJeff Brown <jeffbrown@google.com>
Sat, 5 Nov 2011 02:26:03 +0000 (19:26 -0700)
commit5462bc6318b4b70e7a58c66994e2bd79f59d9739
tree4c5c4b7980974adb8c5fc11df32e1a523cd94306
parent348297abc0e03fb87a1d22465020b580d83fdd61
Fix a leak in Parcel::writeBlob.

Was mistakenly assuming that Parcel::writeFileDescriptor took
ownership of the fd that was passed in.  It does not!
Added some comments and a default parameter to allow the caller
to specify whether it wishes the Parcel to take ownership.

Bug: 5563374
Change-Id: I5a12f51d582bf246ce90133cce7690bb9bca93f6
include/binder/Parcel.h
libs/binder/Parcel.cpp