diff options
author | Mike Hommey <glandium@debian.org> | 2006-04-29 21:57:40 +0200 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2006-04-29 21:57:40 +0200 |
commit | 07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e (patch) | |
tree | 7b377fd8e804a983cb2c57a43be1093ef179c5fd /schematron.c | |
parent | c5d565931c4823dc8f62fffcb65aecfec516f7b9 (diff) | |
download | libxml2-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.c | 25 |
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; |