From 20599a601328b4c87947b0f6dbf7b5cfe3fdb7b7 Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Tue, 3 Jan 2017 15:43:50 +0900 Subject: [PATCH] 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.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 --- packaging/capi-media-camera.spec | 2 +- src/camera.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec index 6aa000c..2d8a855 100644 --- a/packaging/capi-media-camera.spec +++ b/packaging/capi-media-camera.spec @@ -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 diff --git a/src/camera.c b/src/camera.c index 6388caa..7088bf3 100644 --- a/src/camera.c +++ b/src/camera.c @@ -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"); -- 2.7.4