summaryrefslogtreecommitdiff
path: root/schematron.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2006-04-29 21:57:40 +0200
committerMike Hommey <glandium@debian.org>2006-04-29 21:57:40 +0200
commit07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e (patch)
tree7b377fd8e804a983cb2c57a43be1093ef179c5fd /schematron.c
parentc5d565931c4823dc8f62fffcb65aecfec516f7b9 (diff)
downloadlibxml2-07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e.tar.gz
Load /tmp/libxml2-2.6.24 intoupstream/2.6.24.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'schematron.c')
-rw-r--r--schematron.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/schematron.c b/schematron.c
index 98184ac..0a90ff8 100644
--- a/schematron.c
+++ b/schematron.c
@@ -1044,11 +1044,10 @@ done:
if (doc != NULL)
xmlFreeDoc(doc);
}
- if (href == NULL)
- xmlFree(href);
- if (base == NULL)
+ xmlFree(href);
+ if (base != NULL)
xmlFree(base);
- if (URI == NULL)
+ if (URI != NULL)
xmlFree(URI);
return(ret);
}
@@ -1207,13 +1206,15 @@ exit:
if (!preserve) {
xmlFreeDoc(doc);
}
- if (ctxt->nberrors != 0) {
- xmlSchematronFree(ret);
- ret = NULL;
- } else {
- ret->namespaces = ctxt->namespaces;
- ret->nbNamespaces = ctxt->nbNamespaces;
- ctxt->namespaces = NULL;
+ if (ret != NULL) {
+ if (ctxt->nberrors != 0) {
+ xmlSchematronFree(ret);
+ ret = NULL;
+ } else {
+ ret->namespaces = ctxt->namespaces;
+ ret->nbNamespaces = ctxt->nbNamespaces;
+ ctxt->namespaces = NULL;
+ }
}
return (ret);
}
@@ -1519,7 +1520,7 @@ xmlSchematronNextNode(xmlNodePtr cur) {
do {
cur = cur->parent;
- if (cur == NULL) return(NULL);
+ if (cur == NULL) break;
if (cur->type == XML_DOCUMENT_NODE) return(NULL);
if (cur->next != NULL) {
cur = cur->next;