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