Skip to content

Commit 2973a71

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix gidlist allocation leak on error
2 parents 381ab44 + 26d417d commit 2973a71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/posix/posix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ PHP_FUNCTION(posix_getgroups)
306306
gidlist = emalloc(sizeof(gid_t) * result);
307307
if ((result = getgroups(result, gidlist)) < 0) {
308308
POSIX_G(last_error) = errno;
309+
efree(gidlist);
309310
RETURN_FALSE;
310311
}
311312

0 commit comments

Comments
 (0)