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

xmllint: Fix --memory --repeat

Always reset parser context.

Should fix #937.
This commit is contained in:
Nick Wellnhofer
2025-06-04 20:42:39 +02:00
parent 220c813e35
commit fa81e849be

View File

@@ -3055,10 +3055,17 @@ xmllintMain(int argc, const char **argv, FILE *errStream,
lint->ctxt = ctxt;
for (j = 0; j < lint->repeat; j++) {
if (j > 0) {
#ifdef LIBXML_PUSH_ENABLED
if ((lint->push) && (j > 0))
xmlCtxtResetPush(ctxt, NULL, 0, NULL, NULL);
if (lint->push) {
xmlCtxtResetPush(ctxt, NULL, 0, NULL, NULL);
} else
#endif
{
xmlCtxtReset(ctxt);
}
}
if (lint->sax) {
testSAX(lint, filename);
} else {