From: Jeongmo Yang Date: Tue, 3 Jan 2017 06:38:35 +0000 (+0900) Subject: Remove g_thread_unref after g_thread_join X-Git-Tag: submit/tizen_3.0/20170105.073655^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7650bca661c344942fdda3f0f669b4d02d178fd2;p=platform%2Fcore%2Fapi%2Frecorder.git Remove g_thread_unref after g_thread_join g_thread_unref is also called in g_thread_join, so g_thread_unref after g_thread_join is not needed and it can cause memory corruption. [Version] 0.2.49 [Profile] Common [Issue Type] Bug fix [Dependency module] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-3.0-mobile_20161230.2] Change-Id: I829d33bd0786caf49858b1ec506ff4408d4b7c45 Signed-off-by: Jeongmo Yang --- diff --git a/packaging/capi-media-recorder.spec b/packaging/capi-media-recorder.spec index 0f5d4f0..8816d29 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.2.48 +Version: 0.2.49 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/recorder.c b/src/recorder.c index f0116e6..b799ef1 100644 --- a/src/recorder.c +++ b/src/recorder.c @@ -1090,7 +1090,6 @@ static void __destroy_msg_handler_thread(recorder_msg_handler_info_s *handler_in g_mutex_unlock(&handler_info->mutex); g_thread_join(handler_info->thread); - g_thread_unref(handler_info->thread); handler_info->thread = NULL; g_mutex_clear(&handler_info->mutex); @@ -1330,7 +1329,6 @@ static void _recorder_client_callback_destroy(recorder_cb_info_s *cb_info) LOGD("MSG receive thread[%p] destroy", cb_info->msg_recv_thread); g_thread_join(cb_info->msg_recv_thread); - g_thread_unref(cb_info->msg_recv_thread); cb_info->msg_recv_thread = NULL; LOGD("msg_recv thread removed");