diff options
Diffstat (limited to 'third_party/libxml/debugXML.c')
-rw-r--r-- | third_party/libxml/debugXML.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/libxml/debugXML.c b/third_party/libxml/debugXML.c index 3985ad3..de6fd6c 100644 --- a/third_party/libxml/debugXML.c +++ b/third_party/libxml/debugXML.c @@ -320,7 +320,8 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) { } if (node->next == NULL) { if ((node->parent != NULL) && (node->type != XML_ATTRIBUTE_NODE) && - (node->parent->last != node)) + (node->parent->last != node) && + (node->parent->type == XML_ELEMENT_NODE)) xmlDebugErr(ctxt, XML_CHECK_NO_NEXT, "Node has no next and not last of parent list\n"); } else { @@ -3244,6 +3245,7 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input, "Unknown command %s\n", command); } free(cmdline); /* not xmlFree here ! */ + cmdline = NULL; } #ifdef LIBXML_XPATH_ENABLED xmlXPathFreeContext(ctxt->pctxt); |