mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
call xmlFreeNode() or xmlFreeDoc() depending on the type of node, to be safe
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34734 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
da87b87a52
commit
816017aec4
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-02-07 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSXMLNode.m: Changed dealloc to call xmlFreeNode() or
|
||||
xmlFreeDoc() depending on the type of node.
|
||||
|
||||
2012-02-07 13:12-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLNode.m: Correct issue with crash on
|
||||
|
|
|
@ -952,7 +952,14 @@ NSLog(@"RELEASING TRICKY EXTRA RETAIN in %@ now: %d", self, internal->externalRe
|
|||
node->_private = NULL;
|
||||
if (node && node->parent == NULL)
|
||||
{
|
||||
<<<<<<< .mine
|
||||
if (node->type == XML_DOCUMENT_NODE)
|
||||
xmlFreeDoc((xmlDocPtr)node);
|
||||
else
|
||||
xmlFreeNode(node); // the top level node frees the entire tree
|
||||
=======
|
||||
xmlFreeNode(node); // the top level node frees the entire tree
|
||||
>>>>>>> .r34733
|
||||
}
|
||||
GS_DESTROY_INTERNAL(NSXMLNode);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue