final touch running DTD validation on the XmlTextReader added a specific
* valid.c xmlreader.c: final touch running DTD validation
on the XmlTextReader
* python/tests/Makefile.am python/tests/reader2.py: added a
specific run based on the examples from test/valid/*.xml
Daniel
diff --git a/xmlreader.c b/xmlreader.c
index 9655624..e36bbf3 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -696,6 +696,12 @@
xmlFreeDoc(reader->ctxt->myDoc);
reader->ctxt->myDoc = NULL;
}
+ if ((reader->ctxt->vctxt.vstateTab != NULL) &&
+ (reader->ctxt->vctxt.vstateMax > 0)){
+ xmlFree(reader->ctxt->vctxt.vstateTab);
+ reader->ctxt->vctxt.vstateTab = 0;
+ reader->ctxt->vctxt.vstateMax = 0;
+ }
if (reader->allocs & XML_TEXTREADER_CTXT)
xmlFreeParserCtxt(reader->ctxt);
}