1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-05 19:35:54 +03:00

make xmlFreeNode() handle attributes correctly. Daniel

* tree.c: make xmlFreeNode() handle attributes correctly.
Daniel
This commit is contained in:
Daniel Veillard
2002-11-07 14:18:03 +00:00
parent b8e99cc106
commit a70d62f296
2 changed files with 8 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
Thu Nov 7 15:16:02 CET 2002 Daniel Veillard <daniel@veillard.com>
* tree.c: make xmlFreeNode() handle attributes correctly.
Wed Nov 6 23:51:11 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de> Wed Nov 6 23:51:11 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
* catalog.c: completed the #96963 fix, as reported by Karl * catalog.c: completed the #96963 fix, as reported by Karl

4
tree.c
View File

@@ -2653,6 +2653,10 @@ xmlFreeNode(xmlNodePtr cur) {
xmlFreeNs((xmlNsPtr) cur); xmlFreeNs((xmlNsPtr) cur);
return; return;
} }
if (cur->type == XML_ATTRIBUTE_NODE) {
xmlFreeProp((xmlAttrPtr) cur);
return;
}
if ((cur->children != NULL) && if ((cur->children != NULL) &&
(cur->type != XML_ENTITY_REF_NODE)) (cur->type != XML_ENTITY_REF_NODE))
xmlFreeNodeList(cur->children); xmlFreeNodeList(cur->children);