Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7c453645 authored by Jared Duke's avatar Jared Duke Committed by Android Build Coastguard Worker
Browse files

Ensure address-related JNI allocations are released

The Bluetooth AdapterService JNI layer relies heavily on 6-byte
address arrays. These are mapped from Java arrays via
GetByteArrayElements, but in several instances, the allocated result
is not explicitly released with ReleaseByteArrayElements.

As an initial fix, patch these callsites with the appropriate release
call. A follow-up change will refactor the way these addresses are
converted, switching instead to the lighter weight GetByteArrayRegion
alternative, avoiding allocations altogether.

Bug: 393431093
Test: m + presubmit
Flags: EXEMPT bugfix
(cherry picked from https://android-review.googlesource.com/q/commit:a6f41428fb905032aaed76464f1bab9c91b24538)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:99885cdb1198cd7d216b90ead43b2b3e0c844aa8)
Merged-In: Ie2cfa4304608bc13be82b0d280c3112839e56e36
Change-Id: Ie2cfa4304608bc13be82b0d280c3112839e56e36
parent c43102c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment