diff options
author | George Burgess IV <gbiv@google.com> | 2022-03-13 23:29:26 -0700 |
---|---|---|
committer | George Burgess <gbiv@google.com> | 2022-03-14 07:17:41 +0000 |
commit | 61809036226d968873c3cbb90de6a82142ded4dc (patch) | |
tree | d64ce2ea4f26e594dda52fafefd26e84d45dd148 /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | 3115ab2e3c7f4d9edc8fdf68bd6893fa7cf4a708 (diff) |
test: replace callocs with stack allocs
The ASSERT_TRUEs caused us to leak our `calloc`s, which upset our static
analyzer. It should be just as clean to use stack memory, so do that
instead.
Caught by the static analyzer:
packages/modules/Bluetooth/system/main/test/main_shim_test.cc:370:5:
warning: Potential leak of memory pointed to by 'bt_hdr'
[clang-analyzer-unix.Malloc]
packages/modules/Bluetooth/system/main/test/main_shim_test.cc:384:5:
warning: Potential leak of memory pointed to by 'bt_hdr'
[clang-analyzer-unix.Malloc]
packages/modules/Bluetooth/system/main/test/main_shim_test.cc:400:5:
warning: Potential leak of memory pointed to by 'bt_hdr'
[clang-analyzer-unix.Malloc]
Tag: #refactor
Bug: 206470603
Test: TreeHugger
Change-Id: Ifd4e191b865ab1f09548c4e7732547ed3406090e
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
0 files changed, 0 insertions, 0 deletions