xmllint: Fix UAF with --push --repeat Short-lived regression. Fixes #841.
diff --git a/xmllint.c b/xmllint.c index 05b276f..272d8a5 100644 --- a/xmllint.c +++ b/xmllint.c
@@ -349,6 +349,7 @@ xmlParseChunk(ctxt, chars, 0, 1); doc = ctxt->myDoc; + ctxt->myDoc = NULL; if (f != stdin) fclose(f); return(doc); @@ -427,6 +428,7 @@ } htmlParseChunk(ctxt, chars, 0, 1); doc = ctxt->myDoc; + ctxt->myDoc = NULL; if (f != stdin) fclose(f);