]> granicus.if.org Git - php/commitdiff
no need to fetch name and free it immediately after that
authorAntony Dovgal <tony2001@php.net>
Wed, 19 Jul 2006 08:35:55 +0000 (08:35 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 19 Jul 2006 08:35:55 +0000 (08:35 +0000)
ext/filter/callback_filter.c

index 5ce17fe23fc113d626500f5c26bf95d11dd3d0ca..d0f6708fbfe9d5607717d22a5652f789c417cf87 100644 (file)
 
 void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL)
 {
-       char *name = NULL;
        zval *retval_ptr;
        zval ***args;
        int status;
 
-       if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, &name)) {
+       if (!option_array || !zend_is_callable(option_array, IS_CALLABLE_CHECK_NO_ACCESS, NULL)) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "First argument is expected to be a valid callback");
-               if (name) {
-                       efree(name);
-               }
                zval_dtor(value);
                Z_TYPE_P(value) = IS_NULL;
                return;
        }
-       efree(name);
 
        args = safe_emalloc(sizeof(zval **), 1, 0);
        args[0] = &value;