Skip to content

Commit 26d417d

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix gidlist allocation leak on error
2 parents 61e385a + 454d297 commit 26d417d

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
@@ -300,6 +300,7 @@ PHP_FUNCTION(posix_getgroups)
300300
gidlist = emalloc(sizeof(gid_t) * result);
301301
if ((result = getgroups(result, gidlist)) < 0) {
302302
POSIX_G(last_error) = errno;
303+
efree(gidlist);
303304
RETURN_FALSE;
304305
}
305306

0 commit comments

Comments
 (0)