Skip to content

Commit af5eae3

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: ext/pcntl: Fix cpuset leak in pcntl_setcpuaffinity on out-of-range CPU ID
2 parents 14bb2aa + 37ce67f commit af5eae3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/pcntl/pcntl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,7 @@ PHP_FUNCTION(pcntl_setcpuaffinity)
17821782

17831783
if (cpu < 0 || cpu >= maxcpus) {
17841784
zend_argument_value_error(2, "cpu id must be between 0 and " ZEND_ULONG_FMT " (" ZEND_LONG_FMT ")", maxcpus, cpu);
1785+
PCNTL_CPU_DESTROY(mask);
17851786
RETURN_THROWS();
17861787
}
17871788

0 commit comments

Comments
 (0)