Fix memory leak 98/123398/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Tue, 21 Feb 2017 05:44:11 +0000 (14:44 +0900)
committerKwangyoun Kim <ky85.kim@samsung.com>
Wed, 5 Apr 2017 10:22:54 +0000 (03:22 -0700)
Change-Id: Id5e451ac0900f17bfe98067e5dec98367daf9090
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
(cherry picked from commit 33f70915a1a616aa81e93f9fb4d934bbf364403e)

common/stt_config_parser.c

index 7221d3b..083d657 100644 (file)
@@ -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;
                                }