tony2001 Fri Oct 17 22:09:35 2008 UTC Modified files: /php-src/ext/spl spl_array.c Log: fix memleak http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.151&r2=1.152&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.151 php-src/ext/spl/spl_array.c:1.152 --- php-src/ext/spl/spl_array.c:1.151 Sun Oct 5 14:19:55 2008 +++ php-src/ext/spl/spl_array.c Fri Oct 17 22:09:35 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.151 2008/10/05 14:19:55 colder Exp $ */ +/* $Id: spl_array.c,v 1.152 2008/10/17 22:09:35 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -1255,6 +1255,8 @@ if (use_arg) { if (ZEND_NUM_ARGS() != 1 || zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) { + Z_TYPE_P(tmp) = IS_NULL; + zval_ptr_dtor(&tmp); zend_throw_exception(spl_ce_BadMethodCallException, "Function expects exactly one argument", 0 TSRMLS_CC); return; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php