From: Felipe Pena Date: Mon, 27 Apr 2009 12:52:31 +0000 (+0000) Subject: - MFH: Fixed bug #48087 (call_user_method() invalid free of arguments) X-Git-Tag: php-5.3.0RC2~93 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=476ea1ad69bf7f982ec13922a5633df0d60dbd69;p=php - MFH: Fixed bug #48087 (call_user_method() invalid free of arguments) --- diff --git a/NEWS b/NEWS index 30c6e91608..e80696be1d 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ PHP NEWS disable this behaviour using "http"=>array("auto_decode"=>0) in stream context. (Dmitry) +- Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe) - Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo) - Fixed bug #48023 (spl_autoload_register didn't store closures). (Etienne) - Fixed bug #48004 (Error handler prevents creation of default object). diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 3da1408640..b65c4575fa 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4780,7 +4780,9 @@ PHP_FUNCTION(call_user_method) } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call %s()", Z_STRVAL_P(callback)); } - efree(params); + if (n_params) { + efree(params); + } } /* }}} */