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:
11
xmllint.c
11
xmllint.c
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user