mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
Don't use default SAX handler to report unrelated errors
This commit is contained in:
@ -6481,11 +6481,6 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding)
|
|||||||
}
|
}
|
||||||
canonicFilename = (char *) xmlCanonicPath((const xmlChar *) filename);
|
canonicFilename = (char *) xmlCanonicPath((const xmlChar *) filename);
|
||||||
if (canonicFilename == NULL) {
|
if (canonicFilename == NULL) {
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
|
||||||
if (xmlDefaultSAXHandler.error != NULL) {
|
|
||||||
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
xmlFreeParserCtxt(ctxt);
|
xmlFreeParserCtxt(ctxt);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
@ -891,11 +891,7 @@ xmlParseCatalogFile(const char *filename) {
|
|||||||
|
|
||||||
ctxt = xmlNewParserCtxt();
|
ctxt = xmlNewParserCtxt();
|
||||||
if (ctxt == NULL) {
|
if (ctxt == NULL) {
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
xmlCatalogErrMemory("allocating parser context");
|
||||||
if (xmlDefaultSAXHandler.error != NULL) {
|
|
||||||
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user