Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix gidlist allocation leak on error
This commit is contained in:
Nikita Popov 2021-04-11 10:38:16 +02:00
commit 2973a71a91

View file

@ -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;
}