summaryrefslogtreecommitdiff
path: root/ext/domxml/php_domxml.c
diff options
context:
space:
mode:
authorJoseph Tate <jtate@php.net>2002-03-07 23:52:57 +0000
committerJoseph Tate <jtate@php.net>2002-03-07 23:52:57 +0000
commit7ad4b465ca671c14056638ca1b001c41e59ae5ff (patch)
treebc01ea794f6bfde39858c27e1a8673bfdc828e1c /ext/domxml/php_domxml.c
parentf57fe2a8dfa9b068fdb7bf2bcba765f6b1efa964 (diff)
downloadphp-git-7ad4b465ca671c14056638ca1b001c41e59ae5ff.tar.gz
Commented out a few lines that were causing a segfault in the unlink code.
This fixes bug #14522. I've tested that it does not cause a segfault under RH 7.2, and retains all functionality. I recommend that this patch be considered for the PHP_4_2_0 tree as well, as having a function that core dumps every time is a bad thing(TM).
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 */
}
/* }}} */