1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00

Add LIBXML_VALID_ENABLED to xmlreader

There are already LIBXML_VALID_ENABLED in this file to guard against
"--without-valid" at "./configure" step, but here they were missing.
This commit is contained in:
Łukasz Wojniłowicz 2020-04-28 17:00:37 +02:00 committed by Nick Wellnhofer
parent e7ff2efc5d
commit 386fb27654

View File

@ -2260,6 +2260,7 @@ xmlFreeTextReader(xmlTextReaderPtr reader) {
if (reader->ctxt != NULL) {
if (reader->dict == reader->ctxt->dict)
reader->dict = NULL;
#ifdef LIBXML_VALID_ENABLED
if ((reader->ctxt->vctxt.vstateTab != NULL) &&
(reader->ctxt->vctxt.vstateMax > 0)){
while (reader->ctxt->vctxt.vstateNr > 0)
@ -2268,6 +2269,7 @@ xmlFreeTextReader(xmlTextReaderPtr reader) {
reader->ctxt->vctxt.vstateTab = NULL;
reader->ctxt->vctxt.vstateMax = 0;
}
#endif /* LIBXML_VALID_ENABLED */
if (reader->ctxt->myDoc != NULL) {
if (reader->preserve == 0)
xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);