mirror of
https://github.com/php/php-src.git
synced 2025-01-10 21:14:37 +08:00
fix memleak
This commit is contained in:
parent
868c69b72b
commit
ac589d8084
@ -1255,6 +1255,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user