Plug resource leak.
Found with: Coverity Prevent CID: 7040
This commit is contained in:
parent
dc5a530b04
commit
3e6ce93ee1
@ -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…
x
Reference in New Issue
Block a user