mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
tree: Fix freeing entities via xmlFreeNode
Call xmlFreeEntity to free all entity members. Fixes #731.
This commit is contained in:
parent
039ce1e821
commit
2f12809612
9
tree.c
9
tree.c
@ -3731,17 +3731,16 @@ xmlFreeNode(xmlNodePtr cur) {
|
||||
xmlFreeProp((xmlAttrPtr) cur);
|
||||
return;
|
||||
}
|
||||
if (cur->type == XML_ENTITY_DECL) {
|
||||
xmlFreeEntity((xmlEntityPtr) cur);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
|
||||
xmlDeregisterNodeDefaultValue(cur);
|
||||
|
||||
if (cur->doc != NULL) dict = cur->doc->dict;
|
||||
|
||||
if (cur->type == XML_ENTITY_DECL) {
|
||||
xmlEntityPtr ent = (xmlEntityPtr) cur;
|
||||
DICT_FREE(ent->SystemID);
|
||||
DICT_FREE(ent->ExternalID);
|
||||
}
|
||||
if ((cur->children != NULL) &&
|
||||
(cur->type != XML_ENTITY_REF_NODE))
|
||||
xmlFreeNodeList(cur->children);
|
||||
|
Loading…
x
Reference in New Issue
Block a user