Skip to content

Commit 0b2ceb0

Browse files
committed
Remove unused variable 'error'
Will also get rid of the potential allocation happening in zend_is_callable_ex().
1 parent 3ff3199 commit 0b2ceb0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/pcntl/pcntl.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,14 +654,12 @@ PHP_FUNCTION(pcntl_signal)
654654
RETURN_TRUE;
655655
}
656656

657-
if (!zend_is_callable_ex(handle, NULL, 0, NULL, NULL, &error)) {
657+
if (!zend_is_callable_ex(handle, NULL, 0, NULL, NULL, NULL)) {
658658
PCNTL_G(last_error) = EINVAL;
659659

660660
zend_argument_type_error(2, "must be of type callable|int, %s given", zend_zval_value_name(handle));
661-
efree(error);
662661
RETURN_THROWS();
663662
}
664-
ZEND_ASSERT(!error);
665663

666664
/* Add the function name to our signal table */
667665
handle = zend_hash_index_update(&PCNTL_G(php_signal_table), signo, handle);

0 commit comments

Comments
 (0)