Send empty shutdown flags to avoid a binder memory leak (#8728)

This commit is contained in:
John Cormie 2021-11-30 16:00:43 -08:00 committed by GitHub
parent 65c00cf24e
commit 27b03c66a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -345,6 +345,8 @@ public abstract class BinderTransport
// Ignore.
}
Parcel parcel = Parcel.obtain();
// Send empty flags to avoid a memory leak linked to empty parcels (b/207778694).
parcel.writeInt(0);
try {
outgoingBinder.transact(SHUTDOWN_TRANSPORT, parcel, null, IBinder.FLAG_ONEWAY);
} catch (RemoteException re) {