cvs: php4 /ext/domxml php_domxml.c

From: Date: Thu, 07 Mar 2002 23:52:57 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9813@lists.php.net to get a copy of this message
jtate Thu Mar 7 18:52:57 2002 EDT Modified files: /php4/ext/domxml php_domxml.c Log: 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). Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.119 php4/ext/domxml/php_domxml.c:1.120 --- php4/ext/domxml/php_domxml.c:1.119 Thu Mar 7 11:34:13 2002 +++ php4/ext/domxml/php_domxml.c Thu Mar 7 18:52:57 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.119 2002/03/07 16:34:13 jtate Exp $ */ +/* $Id: php_domxml.c,v 1.120 2002/03/07 23:52:57 jtate Exp $ */ /* TODO * - Support Notation Nodes @@ -1802,8 +1802,12 @@ 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 */ } /* }}} */

« previous php.cvs (#9813) next »