com php-src: Drop useless allocation in php_filter_callback : ext/filter/callback_filter.c
| From: | Nikita Popov | Date: | Tue, 04 Jul 2017 19:11:22 +0000 |
| Subject: | com php-src: Drop useless allocation in php_filter_callback : ext/filter/callback_filter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98339@lists.php.net to get a copy of this message | ||
Commit: 3f8ceb6f05893e3371297ee63843cc4766956675
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 29 Jun 2017 20:11:33 +0200
Parents: 8126599670f5365b7c5d1035ab0e23bb56c554d4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3f8ceb6f05893e3371297ee63843cc4766956675
Log:
Drop useless allocation in php_filter_callback
Changed paths:
M ext/filter/callback_filter.c
Diff:
diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c
index 8ad72f5..811cb1b 100644
--- a/ext/filter/callback_filter..c
+++ b/ext/filter/callback_filter.c
@@ -23,7 +23,7 @@
void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL)
{
zval retval;
- zval *args;
+ zval args[1];
int status;
if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, NULL)) {
@@ -33,7 +33,6 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL)
return;
}
- args = safe_emalloc(sizeof(zval), 1, 0);
ZVAL_COPY(&args[0], value);
status = call_user_function_ex(EG(function_table), NULL, option_array, &retval, 1, args, 0,
NULL);
@@ -46,7 +45,6 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL)
}
zval_ptr_dtor(&args[0]);
- efree(args);
}
/*