summaryrefslogtreecommitdiff
path: root/ext/domxml/php_domxml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r--ext/domxml/php_domxml.c8
1 files changed, 6 insertions, 2 deletions
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 */
}
/* }}} */