text = ASCII(xmlTextReaderValue(reader));
if (text) {
icon->text = __get_icon_with_path(text, uid);
- free(text);
+ xmlFree(text);
}
return 0;
if (copyDocPtr == NULL)
return -1;
xmlNode *rootElement = xmlDocGetRootElement(copyDocPtr);
- if (rootElement == NULL)
+ if (rootElement == NULL) {
+ xmlFreeDoc(copyDocPtr);
return -1;
+ }
xmlNode *cur_node = xmlFirstElementChild(rootElement);
- if (cur_node == NULL)
+ if (cur_node == NULL) {
+ xmlFreeDoc(copyDocPtr);
return -1;
+ }
xmlNode *temp = xmlTextReaderExpand(reader);
- if (temp == NULL)
+ if (temp == NULL) {
+ xmlFreeDoc(copyDocPtr);
return -1;
+ }
xmlNode *next_node = NULL;
while (cur_node != NULL) {
if ((strcmp(ASCII(temp->name), ASCII(cur_node->name)) == 0) &&
cur_node = next_node;
}
}
- if (cur_node == NULL)
+ if (cur_node == NULL) {
+ xmlFreeDoc(copyDocPtr);
return -1;
+ }
next_node = xmlNextElementSibling(cur_node);
if (next_node) {
cur_node->next = NULL;
if (strcmp(tag, ASCII(elementName)) == 0) {
_LOGD("find : tag[%s] ACTION_TYPE[%d] pkg[%s]\n", tag, action, pkgid);
__run_tag_parser_prestep(lib_handle, reader, action, pkgid);
- break;
}
+ xmlFree(elementName);
break;
}