From cfa3f6bc6a2b922d1555ab1da4f5e079efc484ce Mon Sep 17 00:00:00 2001 From: Rafal Walczyna Date: Thu, 24 May 2018 13:12:03 +0200 Subject: [PATCH] [FMRadio] Fixing invalid use of pointer reference in release_focus lambda Variable from stack was passed to lambda by reference so the value could be invalid on lambda execution. Issue was described in SETIZENVUL-1411 [Verification] 100% auto + manual TCT on TM1 Change-Id: I36543863eebd9f93cb22e1c5868884b7997656a8 Signed-off-by: Rafal Walczyna --- src/radio/radio_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/radio/radio_manager.cc b/src/radio/radio_manager.cc index f381e4b1..9fe1b40b 100644 --- a/src/radio/radio_manager.cc +++ b/src/radio/radio_manager.cc @@ -241,7 +241,7 @@ void SoundStreamFocusCallback(sound_stream_info_h stream_info, sound_stream_focu } else { // As we stopped radio on first interrupt, we will release focus on second LoggerD("Preparing to release focus"); - auto release_focus = [&manager]() { + auto release_focus = [manager]() { ScopeLogger("Entered into asynchronous function, release_focus"); const auto sound_focus_err = sound_manager_release_focus( manager->GetStreamInfo(), SOUND_STREAM_FOCUS_FOR_PLAYBACK, SOUND_BEHAVIOR_NONE, NULL); -- 2.34.1