Remove g_thread_unref after g_thread_join 47/108147/1
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 3 Jan 2017 06:43:50 +0000 (15:43 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 3 Jan 2017 06:43:50 +0000 (15:43 +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.92
[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: I06b8841d8788a101dd099f58e1356fcfb1ec1885
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-camera.spec
src/camera.c

index 6aa000c..2d8a855 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-camera
 Summary:    A Camera API
-Version:    0.2.91
+Version:    0.2.92
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 6388caa..7088bf3 100644 (file)
@@ -2177,7 +2177,6 @@ static void __destroy_msg_handler_thread(camera_msg_handler_info_s *handler_info
        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);
@@ -2294,7 +2293,6 @@ static void _camera_client_callback_destroy(camera_cb_info_s *cb_info)
        LOGD("msg_recv 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");