]> granicus.if.org Git - php/commitdiff
- Fixed a coredump involved in the domxml_unlink() function. Refer to bug #14522
authorJoseph Tate <jtate@php.net>
Fri, 8 Mar 2002 23:39:26 +0000 (23:39 +0000)
committerJoseph Tate <jtate@php.net>
Fri, 8 Mar 2002 23:39:26 +0000 (23:39 +0000)
for more details.
@ Fixed seg fault in domxml_unlink() (jtate)

ext/domxml/php_domxml.c

index b138bec17307d50ab558b09baf24ad6d50d4cf57..2774755ec3998e7517852a5e313e565f9c255562 100644 (file)
@@ -1802,8 +1802,12 @@ PHP_FUNCTION(domxml_node_unlink_node)
        DOMXML_PARAM_NONE(nodep, id, le_domxmlnodep);
 
        xmlUnlinkNode(nodep);
-       xmlFreeNode(nodep);
-       zval_dtor(id);                          /* This is not enough because the children won't be deleted */
+       /*      This causes a Segmentation Fault for some reason.  Removing 
+               it allows the user to re-add the node at some other time, in
+               addition to fixing the segfault.  Node will be freed at
+               shutdown. */
+       /*xmlFreeNode(nodep);
+       zval_dtor(id);*/                        /* This is not enough because the children won't be deleted */
 }
 /* }}} */