summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2017-11-13 17:18:33 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2017-11-13 17:18:33 +0900
commit1bfa89972d74f860c8a2916efabfbf353558080b (patch)
tree3bae08d56d4fdf616ffdbffef0d6a453116492e8
parent3430241b93e8bd6e0519a0b9ce40428802872e60 (diff)
downloadrecorder-1bfa89972d74f860c8a2916efabfbf353558080b.tar.gz
recorder-1bfa89972d74f860c8a2916efabfbf353558080b.tar.bz2
recorder-1bfa89972d74f860c8a2916efabfbf353558080b.zip
Remove remained idle callback when destroy handlesubmit/tizen/20171115.073701accepted/tizen/unified/20171116.060645
The crash could be occurred if idle callback is called after so is unloaded. To avoid it, remove not-called idle event when destroy handle. [Version] 0.3.8 [Profile] Common [Issue Type] Bug fix [Dependency module] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-unified_20171107.4] Change-Id: Ia8ea896a6fde6ab2376849e7cae5542814f39862 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--packaging/capi-media-recorder.spec2
-rw-r--r--src/recorder.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/packaging/capi-media-recorder.spec b/packaging/capi-media-recorder.spec
index d2e2466..70105ca 100644
--- a/packaging/capi-media-recorder.spec
+++ b/packaging/capi-media-recorder.spec
@@ -1,6 +1,6 @@
Name: capi-media-recorder
Summary: A Recorder API
-Version: 0.3.7
+Version: 0.3.8
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/recorder.c b/src/recorder.c
index d6c7936..908ddc7 100644
--- a/src/recorder.c
+++ b/src/recorder.c
@@ -512,6 +512,20 @@ static void _recorder_deactivate_idle_event_all(recorder_cb_info_s *cb_info)
continue;
}
+ if (g_idle_remove_by_data(rec_idle_event)) {
+ LOGW("remove idle event %p done", rec_idle_event);
+
+ cb_info->idle_event_list = g_list_remove(cb_info->idle_event_list, (gpointer)rec_idle_event);
+
+ g_mutex_clear(&rec_idle_event->event_mutex);
+ g_free(rec_idle_event);
+ rec_idle_event = NULL;
+
+ continue;
+ }
+
+ LOGW("remove idle event %p failed", rec_idle_event);
+
if (!g_mutex_trylock(&rec_idle_event->event_mutex)) {
LOGW("lock failed, %p event is calling now", rec_idle_event);