[libxml2] Don't use default SAX handler to report unrelated errors
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Don't use default SAX handler to report unrelated errors
- Date: Mon, 22 Aug 2022 13:44:02 +0000 (UTC)
commit 920753c4aaa66f6500ecd5b4b3e7bc3c92bf503d
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Mon Aug 22 13:46:50 2022 +0200
Don't use default SAX handler to report unrelated errors
HTMLparser.c | 5 -----
catalog.c | 6 +-----
2 files changed, 1 insertion(+), 10 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index ba886908..0100dbee 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -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);
}
diff --git a/catalog.c b/catalog.c
index b7837e3d..e03c3e40 100644
--- a/catalog.c
+++ b/catalog.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]