From a70d62f2962c076c52ebaea91a4781927bcec376 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 7 Nov 2002 14:18:03 +0000 Subject: [PATCH] make xmlFreeNode() handle attributes correctly. Daniel * tree.c: make xmlFreeNode() handle attributes correctly. Daniel --- ChangeLog | 4 ++++ tree.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index e8dd3774..4c411354 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Nov 7 15:16:02 CET 2002 Daniel Veillard + + * tree.c: make xmlFreeNode() handle attributes correctly. + Wed Nov 6 23:51:11 CET 2002 Igor Zlatkovic * catalog.c: completed the #96963 fix, as reported by Karl diff --git a/tree.c b/tree.c index 92267300..44ea7a55 100644 --- a/tree.c +++ b/tree.c @@ -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);