From: sooyeon Date: Fri, 16 Feb 2024 05:04:34 +0000 (+0900) Subject: Fix svace issue (add null checker) X-Git-Tag: accepted/tizen/unified/20240313.134607~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89ac43036269da81971078dccb2e8e69fe65348c;p=platform%2Fcore%2Fuifw%2Ftts.git Fix svace issue (add null checker) Change-Id: Ie3608f29bc7a397eba91a392160a68fd9c08f40b Signed-off-by: sooyeon --- diff --git a/common/tts_config_mgr.c b/common/tts_config_mgr.c index 7d1fa03a..a16ee6fd 100644 --- a/common/tts_config_mgr.c +++ b/common/tts_config_mgr.c @@ -735,9 +735,11 @@ static Eina_Bool tts_config_mgr_inotify_event_cb(void* data, Ecore_Fd_Handler *f SECURE_SLOG(LOG_DEBUG, TAG_TTSCONFIG, "Voice change(%s, %d)", config_info.language, config_info.type); /* Call all callbacks of client*/ - invoke_voice_changed_event(before_lang, before_type, config_info.language, config_info.type, config_info.auto_voice); + if (NULL != before_lang) { + invoke_voice_changed_event(before_lang, before_type, config_info.language, config_info.type, config_info.auto_voice); + free(before_lang); + } free(lang); - free(before_lang); } if (-1 != speech_rate) {