From: dyamy-lee Date: Thu, 19 Sep 2024 10:52:22 +0000 (+0900) Subject: Added the missing parts for free'ing ptts_id X-Git-Tag: accepted/tizen/unified/20240930.043752~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c0617156f884b448f362cb73b309412fd8c2fbd;p=platform%2Fcore%2Fuifw%2Ftts.git Added the missing parts for free'ing ptts_id Change-Id: Iea8ba59775d09e9b40a77264bcbd61142c7d307e --- diff --git a/server/ttsd_server.c b/server/ttsd_server.c index e6a32d0b..494d47c3 100644 --- a/server/ttsd_server.c +++ b/server/ttsd_server.c @@ -1120,6 +1120,10 @@ int ttsd_server_add_text(unsigned int uid, const char* text, const char* lang, i if (NULL == temp_lang) { SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to select valid voice : result lang is NULL"); + if (NULL != temp_ptts_id) { + free(temp_ptts_id); + temp_ptts_id = NULL; + } return TTSD_ERROR_INVALID_VOICE; } @@ -1228,6 +1232,10 @@ int ttsd_server_add_text_with_synthesis_parameter(unsigned int uid, const char* if (NULL == temp_lang) { SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to select valid voice : result lang is NULL"); + if (NULL != temp_ptts_id) { + free(temp_ptts_id); + temp_ptts_id = NULL; + } return TTSD_ERROR_INVALID_VOICE; }