[libxml2] Fix a couple of missing NULL checks



commit 98a4e7128bc92559f05c754d0291a0a5906405d1
Author: Gaurav <g gupta samsung com>
Date:   Fri Nov 29 23:28:21 2013 +0800

    Fix a couple of missing NULL checks
    
    For https://bugzilla.gnome.org/show_bug.cgi?id=708681

 tree.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tree.c b/tree.c
index b517a2c..b0c1372 100644
--- a/tree.c
+++ b/tree.c
@@ -4299,6 +4299,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
            }
            if (doc->intSubset == NULL) {
                q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
+               if (q == NULL) return(NULL);
                q->doc = doc;
                q->parent = parent;
                doc->intSubset = (xmlDtdPtr) q;
@@ -4310,6 +4311,7 @@ xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
        } else
 #endif /* LIBXML_TREE_ENABLED */
            q = xmlStaticCopyNode(node, doc, parent, 1);
+       if (q == NULL) return(NULL);
        if (ret == NULL) {
            q->prev = NULL;
            ret = p = q;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]