Fix issue that detected by static analysis tool
authorSungwook Park <sungwook79.park@samsung.com>
Tue, 24 Sep 2019 04:50:58 +0000 (13:50 +0900)
committerSungwook Park <sungwook79.park@samsung.com>
Tue, 24 Sep 2019 04:50:58 +0000 (13:50 +0900)
Change-Id: Ic31b861d42d2d48e333494e13e90f980f9e26d1e
Signed-off-by: Sungwook Park <sungwook79.park@samsung.com>
plugins/wakeup-manager/src/wakeup_audio_manager.cpp

index c324b4d..d7ca9b0 100644 (file)
@@ -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)