Don't use default SAX handler to report unrelated errors

This commit is contained in:
Nick Wellnhofer 2022-08-22 13:46:50 +02:00
parent 38f04779f7
commit 920753c4aa
2 changed files with 1 additions and 10 deletions

View File

@ -6481,11 +6481,6 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding)
}
canonicFilename = (char *) xmlCanonicPath((const xmlChar *) filename);
if (canonicFilename == NULL) {
#ifdef LIBXML_SAX1_ENABLED
if (xmlDefaultSAXHandler.error != NULL) {
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
}
#endif
xmlFreeParserCtxt(ctxt);
return(NULL);
}

View File

@ -891,11 +891,7 @@ xmlParseCatalogFile(const char *filename) {
ctxt = xmlNewParserCtxt();
if (ctxt == NULL) {
#ifdef LIBXML_SAX1_ENABLED
if (xmlDefaultSAXHandler.error != NULL) {
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
}
#endif
xmlCatalogErrMemory("allocating parser context");
return(NULL);
}