summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2021-12-16 17:16:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-12-16 17:16:31 +0000
commit8581d274154542cb5bcf03b44855555cd20bcfdb (patch)
tree5a397c51b6e276a8311bdb70866078c81e1d33ee /core/java/android
parentda37e0f471866de18e99122f30a5ee5dae9d86f6 (diff)
parent713c258edc79fe6402a57d3c038d964da0dae6fe (diff)
Merge "Binder: recycle Parcel in finally block"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/Binder.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index b069fb336d55..59db8f495dd9 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -1235,10 +1235,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