mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-14 20:01:04 +03:00
Fix leak on SAX1, xmllint --sax1 option and debug
* SAX2.c: don't leak in xmlCheckDefaultedAttributes for standalone checking * xmllint.c: fix xmllint --sax1 to actually use XML_PARSE_SAX1 * debugXML.c: don't raise an error if markup wasn't allocated from dictionary if document was parsed with option disabling it
This commit is contained in:
1
SAX2.c
1
SAX2.c
@ -1446,6 +1446,7 @@ process_external_subset:
|
||||
(const char *)fulln,
|
||||
(const char *)attr->elem);
|
||||
}
|
||||
xmlFree(fulln);
|
||||
}
|
||||
attr = attr->nexth;
|
||||
}
|
||||
|
@ -259,7 +259,9 @@ xmlCtxtCheckName(xmlDebugCtxtPtr ctxt, const xmlChar * name)
|
||||
"Name is not an NCName '%s'", (const char *) name);
|
||||
}
|
||||
if ((ctxt->dict != NULL) &&
|
||||
(!xmlDictOwns(ctxt->dict, name))) {
|
||||
(!xmlDictOwns(ctxt->dict, name)) &&
|
||||
((ctxt->doc == NULL) ||
|
||||
((ctxt->doc->parseFlags & (XML_PARSE_SAX1 | XML_PARSE_NODICT)) == 0))) {
|
||||
xmlDebugErr3(ctxt, XML_CHECK_OUTSIDE_DICT,
|
||||
"Name is not from the document dictionnary '%s'",
|
||||
(const char *) name);
|
||||
|
Reference in New Issue
Block a user