mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-27 08:00:11 +00:00
Plug resource leak.
Found with: Coverity Prevent CID: 7040
This commit is contained in:
parent
dc5a530b04
commit
3e6ce93ee1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208815
@ -290,6 +290,7 @@ chownerr(const char *file)
|
||||
err(1, "malloc");
|
||||
ngroups = getgroups(ngroups_max, groups);
|
||||
while (--ngroups >= 0 && gid != groups[ngroups]);
|
||||
free(groups);
|
||||
if (ngroups < 0) {
|
||||
warnx("you are not a member of group %s", gname);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user