Remove g_thread_unref after g_thread_join 44/108144/1
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 3 Jan 2017 06:38:35 +0000 (15:38 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 3 Jan 2017 06:38:35 +0000 (15:38 +0900)
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 <jm80.yang@samsung.com>
packaging/capi-media-recorder.spec
src/recorder.c

index 0f5d4f0..8816d29 100644 (file)
@@ -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
index f0116e6..b799ef1 100644 (file)
@@ -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");