From c0386a0851fb5fe664cd5215328dc7fe2b210add Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Mon, 27 Apr 2009 12:50:00 +0000 Subject: [PATCH] - Fixed bug #48087 (call_user_method() invalid free of arguments) --- ext/standard/basic_functions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); + } } /* }}} */