diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 2034ca80b05b8..32eae167c9f6b 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1733,6 +1733,7 @@ PHP_FUNCTION(pcntl_setcpuaffinity) if (cpu < 0 || cpu >= maxcpus) { zend_argument_value_error(2, "cpu id must be between 0 and " ZEND_ULONG_FMT " (" ZEND_LONG_FMT ")", maxcpus, cpu); + PCNTL_CPU_DESTROY(mask); RETURN_THROWS(); }