From: Suyeon Hwang Date: Fri, 2 Sep 2022 05:05:40 +0000 (+0900) Subject: Delete timer handle for service state changed notification X-Git-Tag: accepted/tizen/7.0/unified/20230106.165639~3^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fdc322b21854c8d7117664abc0d1614a417b92a;p=platform%2Fcore%2Fuifw%2Ftts.git Delete timer handle for service state changed notification - Issue: The timer handle for service state changed notification is not deleted if ttsd_finalize() is invoked before that the timer is handled. - Solution: This patch makes ttsd_finalize() delete the timer handle. And also, the memory which stores the state change information should be deleted with deleting the timer, because the memory is allocated for this timer behavior. Change-Id: I7a429c8ab5fb89237ba38c2b1c44c9d606ef01dd Signed-off-by: Suyeon Hwang --- diff --git a/server/ttsd_server.c b/server/ttsd_server.c index 4dbfc955..3602a18f 100644 --- a/server/ttsd_server.c +++ b/server/ttsd_server.c @@ -664,6 +664,14 @@ int ttsd_finalize() } } + if (g_notify_state_timer) { + void* data = ecore_timer_del(g_notify_state_timer); + g_notify_state_timer = NULL; + + free(data); + SLOG(LOG_INFO, tts_tag(), "[INFO] Delete ecore notify state timer handle"); + } + if (g_wait_timer) { ecore_timer_del(g_wait_timer); g_wait_timer = NULL;