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)
committerThe Android Automerger <android-build@android.com>
Sat, 5 Nov 2011 05:16:39 +0000 (22:16 -0700)
commit06234b37e3bfb910e7be9b4fdb035c958983a2ae
tree32bb8355ae47abdf8ccf1f0cd59d5557de371888
parente8dc810f7cc6c581107c2d80586401842004d4c5
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