From 29466e36e1b3d3aee355333fc7f157b59f4f6672 Mon Sep 17 00:00:00 2001 From: Sungwook Park Date: Tue, 24 Sep 2019 13:50:58 +0900 Subject: [PATCH] Fix issue that detected by static analysis tool Change-Id: Ic31b861d42d2d48e333494e13e90f980f9e26d1e Signed-off-by: Sungwook Park --- plugins/wakeup-manager/src/wakeup_audio_manager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/wakeup-manager/src/wakeup_audio_manager.cpp b/plugins/wakeup-manager/src/wakeup_audio_manager.cpp index c324b4d..d7ca9b0 100644 --- a/plugins/wakeup-manager/src/wakeup_audio_manager.cpp +++ b/plugins/wakeup-manager/src/wakeup_audio_manager.cpp @@ -94,6 +94,10 @@ void CAudioManager::sound_focus_changed() stop_recording(false); } } + if (extra_info) { + free (extra_info); + extra_info = NULL; + } } void CAudioManager::subscribe(IAudioEventObserver *observer) @@ -137,6 +141,10 @@ void CAudioManager::start_recording(bool proactive) } else { MWR_LOGW("[Recorder] Currently sound focus is acquired by other process, skip recording"); } + if (extra_info) { + free (extra_info); + extra_info = NULL; + } } void CAudioManager::set_recording_session(recording_session session) -- 2.7.4