summaryrefslogtreecommitdiff
path: root/relaxng.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2005-07-12 19:58:48 +0000
committerMike Hommey <glandium@debian.org>2005-07-12 19:58:48 +0000
commit112cb5bb5475afec1c1cbf1d6728ce4880d0fee8 (patch)
tree6c34596134f8665ebc180f29b50915dc70bbe5c1 /relaxng.c
parent0fc063df3ab2ad380d532d210dd1001de473e51b (diff)
downloadlibxml2-112cb5bb5475afec1c1cbf1d6728ce4880d0fee8.tar.gz
Load /tmp/tmp.zfIyNk/libxml2-2.6.20 intoupstream/2.6.20
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'relaxng.c')
-rw-r--r--relaxng.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/relaxng.c b/relaxng.c
index cd28034..b1d4a77 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -2573,11 +2573,11 @@ xmlRelaxNGSchemaTypeCompare(void *data ATTRIBUTE_UNUSED,
}
ret = xmlSchemaValPredefTypeNode(typ, value2, &res2, ctxt2);
if (ret != 0) {
- xmlSchemaFreeValue(res1);
+ if ((comp1 == NULL) && (res1 != NULL))
+ xmlSchemaFreeValue(res1);
return (-1);
}
if (res1 == NULL) {
- xmlSchemaFreeValue(res1);
return (-1);
}
ret = xmlSchemaCompareValues(res1, res2);
@@ -6908,6 +6908,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_MISSING_HREF,
"xmlRelaxNGParse: externalRef has no href attribute\n",
NULL, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
delete = cur;
goto skip_children;
}
@@ -6916,6 +6918,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
"Incorrect URI for externalRef %s\n",
href, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
if (href != NULL)
xmlFree(href);
delete = cur;
@@ -6925,6 +6929,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
"Fragment forbidden in URI for externalRef %s\n",
href, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
xmlFreeURI(uri);
if (href != NULL)
xmlFree(href);
@@ -6938,6 +6944,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
"Failed to compute URL for externalRef %s\n",
href, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
if (href != NULL)
xmlFree(href);
if (base != NULL)
@@ -6954,6 +6962,8 @@ xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
xmlRngPErr(ctxt, cur, XML_RNGP_EXTERNAL_REF_FAILURE,
"Failed to load externalRef %s\n", URL,
NULL);
+ if (ns != NULL)
+ xmlFree(ns);
xmlFree(URL);
delete = cur;
goto skip_children;