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