1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-26 21:41:34 +03:00

xmllint: Check return value of htmlNewParserCtxt

This commit is contained in:
Nick Wellnhofer
2024-12-13 15:12:18 +01:00
parent 1e1b48918c
commit 169857ad26

View File

@@ -1977,6 +1977,10 @@ parseFile(const char *filename, xmlParserCtxtPtr rectxt) {
if (html) {
ctxt = htmlNewParserCtxt();
if (ctxt == NULL) {
progresult = XMLLINT_ERR_MEM;
return(NULL);
}
doc = parseHtml(ctxt, filename);
htmlFreeParserCtxt(ctxt);
return(doc);