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
Loading
Please register or sign in to comment