diff options
| author | 2021-12-16 18:25:52 +0000 | |
|---|---|---|
| committer | 2021-12-16 18:25:52 +0000 | |
| commit | dc63dc4d572d2a330be5e4ba9c9bcc5f758d8fce (patch) | |
| tree | 487d1f82f66150e88a6dac756b5a0d2427a3de90 | |
| parent | d9b9ad284216a2d9a6176e969f893c25438ed50f (diff) | |
| parent | 2cc9570c3be313d4c6a8d2b65ea719b27bdd6b80 (diff) | |
Merge "Binder: recycle Parcel in finally block" am: 8581d27415 am: 0c1dac2572 am: b4f0710e19 am: 2cc9570c3b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926857
Change-Id: Ibeb6d54f6be510c6800c57c28a32398f084be89a
| -rw-r--r-- | core/java/android/os/Binder.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java index e2d7847b85e9..429450ce8e5e 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 |