summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2022-09-19 17:08:47 +0900
committerJinWang An <jinwang.an@samsung.com>2022-09-19 17:08:47 +0900
commit98fe623416969240242386d5f03db880ff468739 (patch)
tree674e24308a1d28658b68bfebeb4b52bce9bb6f81
parenta849528aec830c97947d11c1851b3d5e335d8fd3 (diff)
downloadwatch-setting-accepted/tizen_7.0_unified.tar.gz
watch-setting-accepted/tizen_7.0_unified.tar.bz2
watch-setting-accepted/tizen_7.0_unified.zip
Change-Id: I31cc4c08cedcd26f050e317beadb56ae3ba0150e Signed-off-by: JinWang An <jinwang.an@samsung.com>
-rw-r--r--src/setting-language.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/setting-language.c b/src/setting-language.c
index 7789d47..1b3e810 100644
--- a/src/setting-language.c
+++ b/src/setting-language.c
@@ -536,8 +536,10 @@ static void _tree_walk_langlist(xmlNodePtr cur)
for (cur_node = cur; cur_node; cur_node = cur_node->next) {
if (cur_node->type == XML_ELEMENT_NODE) {
- id = (char *)g_strdup((char *)xmlGetProp(cur_node, (const xmlChar *)"id"));
- name = (char *)g_strdup((char *)xmlGetProp(cur_node, (const xmlChar *)"string"));
+ xmlChar *xml_id = xmlGetProp(cur_node, (const xmlChar *)"id");
+ xmlChar *xml_name = xmlGetProp(cur_node, (const xmlChar *)"string");
+ id = (char *)g_strdup((char *)xml_id);
+ name = (char *)g_strdup((char *)xml_name);
struct _lang_menu_item *pitem = (struct _lang_menu_item *)calloc(1, sizeof(struct _lang_menu_item));
if (pitem) {
@@ -554,6 +556,8 @@ static void _tree_walk_langlist(xmlNodePtr cur)
}
FREE(id);
FREE(name);
+ xmlFree(xml_id);
+ xmlFree(xml_name);
}
}
}