diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java index e2d7847b85e93..429450ce8e5e3 100644 --- a/core/java/android/os/Binder.java +++ b/core/java/android/os/Binder.java @@ -1308,10 +1308,11 @@ public class Binder implements IBinder { data.readCallingWorkSourceUid()); observer.callEnded(callSession, data.dataSize(), reply.dataSize(), workSourceUid); } + + checkParcel(this, code, reply, "Unreasonably large binder reply buffer"); + reply.recycle(); + data.recycle(); } - checkParcel(this, code, reply, "Unreasonably large binder reply buffer"); - reply.recycle(); - data.recycle(); // Just in case -- we are done with the IPC, so there should be no more strict // mode violations that have gathered for this thread. Either they have been