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) {
}
FREE(id);
FREE(name);
+ xmlFree(xml_id);
+ xmlFree(xml_name);
}
}
}