Commit 18a04f2a authored by William M. Brack's avatar William M. Brack

fixed problem with memory leak on text nodes in DTD (bug 148965) with

* tree.c: fixed problem with memory leak on text nodes in DTD
  (bug 148965) with patch provided by Darrell Kindred
parent d43cdcd6
Tue Aug 3 09:42:31 PDT 2004 William Brack <wbrack@mmm.com.hk>
* tree.c: fixed problem with memory leak on text nodes in DTD
(bug 148965) with patch provided by Darrell Kindred
Tue Aug 3 08:14:44 PDT 2004 William Brack <wbrack@mmm.com.hk>
* HTMLparser.c: fixed initialisation problem for htmlReadMemory
......
......@@ -1020,12 +1020,15 @@ xmlFreeDtd(xmlDtdPtr cur) {
xmlNodePtr next, c = cur->children;
/*
* Cleanup all the DTD comments they are not in the DTD
* indexes.
* Cleanup all nodes which are not part of the specific lists
* of notations, elements, attributes and entities.
*/
while (c != NULL) {
next = c->next;
if ((c->type == XML_COMMENT_NODE) || (c->type == XML_PI_NODE)) {
if ((c->type != XML_NOTATION_NODE) &&
(c->type != XML_ELEMENT_DECL) &&
(c->type != XML_ATTRIBUTE_DECL) &&
(c->type != XML_ENTITY_DECL)) {
xmlUnlinkNode(c);
xmlFreeNode(c);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment