From: Wonnam Jang Date: Thu, 10 Nov 2016 03:03:47 +0000 (+0900) Subject: Fix memory leak issue X-Git-Tag: accepted/tizen/common/20161115.200838~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F96714%2F1;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Fix memory leak issue Change-Id: Ic31fc6bd4f4fa49e6ffac2bb165238f1c41c5293 Signed-off-by: Wonnam Jang --- diff --git a/common/vc_info_parser.c b/common/vc_info_parser.c index 83847cf..c4fc2d4 100644 --- a/common/vc_info_parser.c +++ b/common/vc_info_parser.c @@ -191,6 +191,7 @@ int vc_info_parser_get_demandable_clients(GSList** client_list) if (NULL == temp_client) { SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Memory alloc error!!"); + xmlFreeDoc(doc); return -1; } @@ -279,6 +280,7 @@ int vc_info_parser_set_demandable_client(const char* filepath) int ret = xmlSaveFormatFile(VC_RUNTIME_INFO_DEMANDABLE_LIST, doc, 1); SLOG(LOG_DEBUG, vc_info_tag(), "Save demandable file info : %d", ret); + xmlFreeDoc(doc); return 0; } @@ -561,6 +563,7 @@ int vc_info_parser_get_client_info(GSList** client_info_list) if (NULL == client) { SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Memory alloc error!!"); + xmlFreeDoc(doc); return -1; }