Skip to content

Commit

Permalink
Send empty shutdown flags to avoid a binder memory leak (#8728)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdcormie committed Dec 1, 2021
1 parent 65c00cf commit 27b03c6
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -345,6 +345,8 @@ private final void sendShutdownTransaction() {
// 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) {
Expand Down

0 comments on commit 27b03c6

Please sign in to comment.