mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.0'
* PHP-8.0: Fix gidlist allocation leak on error
This commit is contained in:
commit
2973a71a91
1 changed files with 1 additions and 0 deletions
|
@ -306,6 +306,7 @@ PHP_FUNCTION(posix_getgroups)
|
|||
gidlist = emalloc(sizeof(gid_t) * result);
|
||||
if ((result = getgroups(result, gidlist)) < 0) {
|
||||
POSIX_G(last_error) = errno;
|
||||
efree(gidlist);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue