Fix defects detected by static analysis tool 56/309056/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 4 Apr 2024 07:53:47 +0000 (16:53 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Thu, 4 Apr 2024 07:53:47 +0000 (16:53 +0900)
Change-Id: I8937124ef627fc6f41bbc98e70c6ed0bffbc05c2

wakeup-manager/src/wakeup_audio_manager.cpp
wakeup-manager/src/wakeup_manager.cpp

index f80f53532da841b708e624230c12baf95d0ae059..c507c4653c3ae4a10dca016ef05a7cce95286b1e 100644 (file)
@@ -95,7 +95,6 @@ int CAudioManager::initialize(void)
 
 int CAudioManager::deinitialize(void)
 {
-       clear_audio_data();
        if (mStreamingThread.joinable()) {
                MWR_LOGD("mStreamingThread is joinable, trying join()");
                mStopStreamingThread.store(true);
@@ -106,6 +105,7 @@ int CAudioManager::deinitialize(void)
                }
        }
        mStopStreamingThread.store(false);
+       clear_audio_data();
 
        if (mBackgroundVolumeThread.joinable()) {
                MWR_LOGD("mBackgroundVolumeThread is joinable, trying join()");
index 11f4abc5b1a5697dd84e4364f95e82b263bbff8b..1dff730b73c38e4469b2915510cee40ffc40bdfe 100644 (file)
@@ -1189,8 +1189,8 @@ void CWakeupManager::stop_streaming_duration_timer()
                        if (!manager) return;
 
                        Ecore_Timer* timer = manager->get_streaming_duration_timer();
-                       void* ret = ecore_timer_del(timer);
                        MWR_LOGI("DURATION_TIMER EXISTS : %p %p", timer, ret);
+                       void* ret = ecore_timer_del(timer);
                        manager->set_streaming_duration_timer(nullptr);
                }, this);
        }