From 68b67dbfda0d819ceeb8a7ea48c3a39efd29f9c2 Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Tue, 21 Feb 2017 14:44:11 +0900 Subject: [PATCH 1/1] Fix memory leak Change-Id: Id5e451ac0900f17bfe98067e5dec98367daf9090 Signed-off-by: Suyeon Hwang (cherry picked from commit 33f70915a1a616aa81e93f9fb4d934bbf364403e) --- common/stt_config_parser.c | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.7.4