Plug resource leak.

Found with:	Coverity Prevent
CID:		7040
This commit is contained in:
trasz 2010-06-05 08:11:11 +00:00
parent 265a7f94f2
commit e949899e57

View File

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