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

Skip to content
Commit 61809036 authored by George Burgess IV's avatar George Burgess IV Committed by George Burgess
Browse files

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
parent 3115ab2e
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