From dfd28506e0a0df870915f4af16b141eaa0c5d263 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Tue, 19 Mar 2019 15:25:32 +0900 Subject: [PATCH] Add to check the condition before unlocking mutex in focus watch callback handler [Version] 0.12.40 [Issue Type] Bug fix Change-Id: I767b8d1593ee92f8196a9bbdba9ade0ccdbdafa9 Signed-off-by: Sangchul Lee --- mm_sound_focus_private.c | 3 ++- packaging/libmm-sound.spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mm_sound_focus_private.c b/mm_sound_focus_private.c index b087839..da33303 100644 --- a/mm_sound_focus_private.c +++ b/mm_sound_focus_private.c @@ -262,7 +262,8 @@ SKIP_CB_AND_RET: debug_warning("[RETCB][Failed(May Server Close First)]tid(%d) fd(%d) %s errno=%d(%s)", tid, tmpfd, filename2, errno, str_error); g_free(filename2); - g_mutex_unlock(&focus_handle->focus_lock); + if (focus_handle->is_used) + g_mutex_unlock(&focus_handle->focus_lock); return G_SOURCE_CONTINUE; } buf = cb_data.handle; diff --git a/packaging/libmm-sound.spec b/packaging/libmm-sound.spec index 38ead95..2c50937 100644 --- a/packaging/libmm-sound.spec +++ b/packaging/libmm-sound.spec @@ -1,6 +1,6 @@ Name: libmm-sound Summary: MMSound Package contains client lib and sound_server binary -Version: 0.12.39 +Version: 0.12.40 Release: 0 Group: System/Libraries License: Apache-2.0 -- 2.7.4