- parser.c: Fixed bug on invalid ontent characters and when using
push.
- xmllint.c: fixed xmllint endling of errors in push mode
Daniel
diff --git a/xmllint.c b/xmllint.c
index f9d9684..bfa6010 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -382,6 +382,7 @@
f = fopen(filename, "r");
if (f != NULL) {
+ int ret;
int res, size = 3;
char chars[1024];
xmlParserCtxtPtr ctxt;
@@ -397,7 +398,12 @@
}
xmlParseChunk(ctxt, chars, 0, 1);
doc = ctxt->myDoc;
+ ret = ctxt->wellFormed;
xmlFreeParserCtxt(ctxt);
+ if (!ret) {
+ xmlFreeDoc(doc);
+ doc = NULL;
+ }
}
}
} else if (testIO) {