diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 669f532ae67..50e54aec584 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4777,7 +4777,9 @@ PHP_FUNCTION(call_user_method) } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %R()", Z_TYPE_P(callback), Z_UNIVAL_P(callback)); } - efree(params); + if (n_params) { + efree(params); + } } /* }}} */