dmitry Thu Feb 14 08:46:25 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c Log: Fixed memory leak http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.22&r2=1.308.2.21.2.37.2.23&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.22 php-src/ext/standard/array.c:1.308.2.21.2.37.2.23 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.22 Tue Feb 12 01:31:12 2008 +++ php-src/ext/standard/array.c Thu Feb 14 08:46:25 2008 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.22 2008/02/12 01:31:12 felipe Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.23 2008/02/14 08:46:25 dmitry Exp $ */ #include "php.h" #include "php_ini.h" @@ -1911,6 +1911,7 @@ Z_ADDREF_P(new_var); if (zend_hash_next_index_insert(Z_ARRVAL_P(stack), &new_var, sizeof(zval *), NULL) == FAILURE) { + Z_DELREF_P(new_var); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot add element to the array as the next element is already occupied"); efree(args); RETURN_FALSE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php