From: Joseph Tate Date: Fri, 8 Mar 2002 23:39:26 +0000 (+0000) Subject: - Fixed a coredump involved in the domxml_unlink() function. Refer to bug #14522 X-Git-Tag: php-4.2.0RC1~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d03789fb983e872b27ed5f6e8bea0d038001c01;p=php - Fixed a coredump involved in the domxml_unlink() function. Refer to bug #14522 for more details. @ Fixed seg fault in domxml_unlink() (jtate) --- diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index b138bec173..2774755ec3 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -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 */ } /* }}} */