break;
}
- if (cur_ptr == NULL) {
- xmlFreeDoc(xml_doc);
- return -1;
- }
-
cur_ptr = cur_ptr->xmlChildrenNode;
for (cur_node = cur_ptr; cur_node; cur_node = cur_node->next) {
if (!xmlStrcmp(cur_node->name, (const xmlChar*)FEATURE_TAG)) {
for (cur_node = cur_ptr; cur_node; cur_node = cur_node->next) {
if (cur_node->type == XML_ELEMENT_NODE) {
node_name = (char *)xmlGetProp(cur_node, (const xmlChar*)"name");
+ if (node_name == NULL) {
+ xmlFreeDoc(xml_doc);
+ return -1;
+ }
if (!strncmp(node_name, field, strlen(node_name))) {
node_value = (char *)xmlNodeListGetString(xml_doc, cur_node->xmlChildrenNode, 1);