aboutsummaryrefslogtreecommitdiffstats
path: root/valid.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-02-08 13:37:46 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-02-08 13:37:46 +0000
commitd455d79d84f218003f562f129ad6d3212a4c50cc (patch)
tree8f73d71637f669e6c739675feafab4333fe4794f /valid.c
parentc575b997d85d4791d852ad43e175d47a64cf8b3c (diff)
downloadandroid_external_libxml2-d455d79d84f218003f562f129ad6d3212a4c50cc.tar.gz
android_external_libxml2-d455d79d84f218003f562f129ad6d3212a4c50cc.tar.bz2
android_external_libxml2-d455d79d84f218003f562f129ad6d3212a4c50cc.zip
fixing #70166 Daniel
* valid.c: fixing #70166 Daniel
Diffstat (limited to 'valid.c')
-rw-r--r--valid.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/valid.c b/valid.c
index 79f4cf9f..99b30ddf 100644
--- a/valid.c
+++ b/valid.c
@@ -4935,6 +4935,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list,
int nb_valid_elements = 0;
const xmlChar *elements[256];
int nb_elements = 0, i;
+ xmlChar *name;
xmlNode *ref_node;
xmlNode *parent;
@@ -4987,6 +4988,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list,
test_node->parent = parent;
test_node->prev = prev;
test_node->next = next;
+ name = test_node->name;
if (prev) prev->next = test_node;
else parent->children = test_node;
@@ -5020,6 +5022,12 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list,
if (next) next->prev = next_prev;
parent->children = parent_childs;
parent->last = parent_last;
-
+
+ /*
+ * Free up the dummy node
+ */
+ test_node->name = name;
+ xmlFreeNode(test_node);
+
return(nb_valid_elements);
}