From: Suyeon Hwang Date: Tue, 21 Feb 2017 05:44:11 +0000 (+0900) Subject: Fix memory leak X-Git-Tag: accepted/tizen/unified/20170428.004007~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68b67dbfda0d819ceeb8a7ea48c3a39efd29f9c2;p=platform%2Fcore%2Fuifw%2Fstt.git Fix memory leak Change-Id: Id5e451ac0900f17bfe98067e5dec98367daf9090 Signed-off-by: Suyeon Hwang (cherry picked from commit 33f70915a1a616aa81e93f9fb4d934bbf364403e) --- diff --git a/common/stt_config_parser.c b/common/stt_config_parser.c index 7221d3b..083d657 100644 --- a/common/stt_config_parser.c +++ b/common/stt_config_parser.c @@ -971,6 +971,11 @@ int stt_parser_get_time_info(GSList** time_list) if (NULL == temp_info) { SLOG(LOG_ERROR, stt_tag(), "[ERROR] Memory alloc error!!"); + + if (NULL != temp_time_list) { + g_slist_free_full(temp_time_list, free); + temp_time_list = NULL; + } xmlFreeDoc(doc); return -1; }