1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +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

4
tree.c
View File

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