diff options
author | Antony Dovgal <tony2001@php.net> | 2008-10-17 22:09:44 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2008-10-17 22:09:44 +0000 |
commit | 8696c389665f933c0c1d09dc827a5346003783c1 (patch) | |
tree | b4084ec95c515df1af5c86e31d0cfff718f364e0 /ext/spl | |
parent | 057f422c03044dc81bd67252c5843902e2691d22 (diff) | |
download | php-git-8696c389665f933c0c1d09dc827a5346003783c1.tar.gz |
MFH: fix memleak
Diffstat (limited to 'ext/spl')
-rwxr-xr-x | ext/spl/spl_array.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index cade73f63a..807fe68980 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1260,6 +1260,8 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam 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; } |