From: dyamy-lee Date: Tue, 30 Jan 2024 00:53:19 +0000 (+0900) Subject: add null check before calling strdup X-Git-Tag: accepted/tizen/unified/20240207.171607~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eca8e585773b6dfbf30ad4078f54b2d6b2c76df2;p=platform%2Fcore%2Fuifw%2Ftts.git add null check before calling strdup Change-Id: Ib161b1b67c0e104d5169d204365e3b3920a57199 --- diff --git a/common/tts_config_mgr.c b/common/tts_config_mgr.c index f95a228c..7d1fa03a 100644 --- a/common/tts_config_mgr.c +++ b/common/tts_config_mgr.c @@ -479,7 +479,9 @@ static void invoke_voice_changed_event(const char* before_language, int before_v return; } - params->before_language = strdup(before_language); + if (NULL != before_language) { + params->before_language = strdup(before_language); + } params->before_voice_type = before_voice_type; params->current_language = strdup(current_language); params->current_voice_type = current_voice_type;