diff options
author | Mike Hommey <mh@glandium.org> | 2004-11-11 12:53:54 +0000 |
---|---|---|
committer | Mike Hommey <mh@glandium.org> | 2004-11-11 12:53:54 +0000 |
commit | f51dd67f3a3f472af0620391eb588eeca4533689 (patch) | |
tree | 9184c396c489196608427d5fa35814e86a1e479f /xinclude.c | |
parent | 9705f1a5e858108d21a0128556f42b25d16833cd (diff) | |
download | libxml2-f51dd67f3a3f472af0620391eb588eeca4533689.tar.gz |
Load /tmp/tmp.n9GTkp/libxml2-2.6.16 intoupstream/2.6.16
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'xinclude.c')
-rw-r--r-- | xinclude.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -398,6 +398,9 @@ xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) { xmlFree(ctxt->txtTab); if (ctxt->txturlTab != NULL) xmlFree(ctxt->txturlTab); + if (ctxt->base != NULL) { + xmlFree(ctxt->base); + } xmlFree(ctxt); } @@ -681,7 +684,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, /* * Inherit the existing base */ - newctxt->base = ctxt->base; + newctxt->base = xmlStrdup(ctxt->base); /* * Inherit the documents already in use by other includes @@ -1863,7 +1866,7 @@ xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) { newctxt = xmlXIncludeNewContext(ctxt->doc); if (newctxt == NULL) return (-1); - newctxt->base = ctxt->base; /* Inherit the base from the existing context */ + newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the existing context */ xmlXIncludeSetFlags(newctxt, ctxt->parseFlags); ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children); if (ctxt->nbErrors > 0) @@ -2372,7 +2375,7 @@ xmlXIncludeProcessFlags(xmlDocPtr doc, int flags) { ctxt = xmlXIncludeNewContext(doc); if (ctxt == NULL) return(-1); - ctxt->base = (xmlChar *)doc->URL; + ctxt->base = xmlStrdup((xmlChar *)doc->URL); xmlXIncludeSetFlags(ctxt, flags); ret = xmlXIncludeDoProcess(ctxt, doc, tree); if ((ret >= 0) && (ctxt->nbErrors > 0)) |