diff options
author | Daniel Veillard <veillard@redhat.com> | 2012-08-08 15:31:55 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-08-08 15:31:55 +0800 |
commit | 6ca24a39d0eb7fd7378a5bc8be3286bf745a36ba (patch) | |
tree | 6f6735b94c5e04e3e58d72eb79738fa94effad2f /tree.c | |
parent | 89b6f73aea631ab1cca7b9fed71f8add205a08cf (diff) | |
download | android_external_libxml2-6ca24a39d0eb7fd7378a5bc8be3286bf745a36ba.tar.gz android_external_libxml2-6ca24a39d0eb7fd7378a5bc8be3286bf745a36ba.tar.bz2 android_external_libxml2-6ca24a39d0eb7fd7378a5bc8be3286bf745a36ba.zip |
Namespace nodes can't be unlinked with xmlUnlinkNode
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3754,6 +3754,8 @@ xmlFreeNode(xmlNodePtr cur) { * Unlink a node from it's current context, the node is not freed * If one need to free the node, use xmlFreeNode() routine after the * unlink to discard it. + * Note that namespace nodes can't be unlinked as they do not have + * pointer to their parent. */ void xmlUnlinkNode(xmlNodePtr cur) { @@ -3764,6 +3766,8 @@ xmlUnlinkNode(xmlNodePtr cur) { #endif return; } + if (cur->type == XML_NAMESPACE_DECL) + return; if (cur->type == XML_DTD_NODE) { xmlDocPtr doc; doc = cur->doc; |