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

Skip to content
Commit 2da39f90 authored by George Burgess IV's avatar George Burgess IV
Browse files

stream_apis: use a unique_ptr to avoid memory leaks

The early exit in this function causes us to leak `in`. To avoid this
(and potentially other changes that would lead to the same thing), use a
smart pointer.

Caught by the static analyzer:
>
packages/modules/Bluetooth/system/audio_bluetooth_hw/stream_apis.cc:1253:5:
warning: Potential leak of memory pointed to by 'in'
[clang-analyzer-cplusplus.NewDeleteLeaks]

Tag: #stability
Bug: 206470603
Test: TreeHugger
Change-Id: Ic19038061b0d444fcbe8c9656c0ca35819539d3b
parent fb34ed57
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