fixed problem caused by wrong dictionary reference count, reported on the
* xinclude.c: fixed problem caused by wrong dictionary
reference count, reported on the list by Christopher
Grayce.
diff --git a/xinclude.c b/xinclude.c
index 3d27f5e..0b34c3e 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -448,15 +448,15 @@
xmlParseDocument(pctxt);
- if (pctxt->wellFormed)
+ if (pctxt->wellFormed) {
ret = pctxt->myDoc;
+ xmlDictReference(pctxt->dict);
+ }
else {
ret = NULL;
xmlFreeDoc(pctxt->myDoc);
pctxt->myDoc = NULL;
}
- if ((ctxt->doc != NULL) && (pctxt->dict == ctxt->doc->dict))
- xmlDictReference(pctxt->dict);
xmlFreeParserCtxt(pctxt);
return(ret);
@@ -1910,7 +1910,7 @@
((xmlStrEqual(children->ns->href, XINCLUDE_NS)) ||
(xmlStrEqual(children->ns->href, XINCLUDE_OLD_NS)))) {
ret = xmlXIncludeLoadFallback(ctxt, children, nr);
- if (ret == 0)
+ if (ret == 0)
break;
}
children = children->next;