iliaa Mon May 5 23:00:13 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/simplexml simplexml.c
Log:
MFB: Fixed bug #44798 (Memory leak assigning value to attribute).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1150&r2=1.2027.2.547.2.1151&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1150 php-src/NEWS:1.2027.2.547.2.1151
--- php-src/NEWS:1.2027.2.547.2.1150 Mon May 5 12:30:38 2008
+++ php-src/NEWS Mon May 5 23:00:12 2008
@@ -5,6 +5,7 @@
functions. (Andrey)
- Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable
as function parameter. (Rob)
+- Fixed bug #44798 (Memory leak assigning value to attribute). (Ilia)
01 May 2008, PHP 5.2.6
- Fixed two possible crashes inside posix extension (Tony)
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.39&r2=1.151.2.22.2.40&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.39
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.40
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.39 Thu Mar 20 16:48:45 2008
+++ php-src/ext/simplexml/simplexml.c Mon May 5 23:00:13 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c,v 1.151.2.22.2.39 2008/03/20 16:48:45 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.40 2008/05/05 23:00:13 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -695,11 +695,12 @@
convert_to_string(member);
name = Z_STRVAL_P(member);
node = sxe_get_element_by_name(sxe, node, &name, &type TSRMLS_CC);
- if (!node) {
- sxe_prop_dim_write(object, member, NULL, 1, 0, &node TSRMLS_CC);
- type = SXE_ITER_NONE;
- name = NULL;
+ if (node) {
+ return NULL;
}
+ sxe_prop_dim_write(object, member, NULL, 1, 0, &node TSRMLS_CC);
+ type = SXE_ITER_NONE;
+ name = NULL;
MAKE_STD_ZVAL(return_value);
_node_as_zval(sxe, node, return_value, type, name, sxe->iter.nsprefix,
sxe->iter.isprefix TSRMLS_CC);
@@ -2445,7 +2446,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.39 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.40 $");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php