Plug resource leak.

Found with:	Coverity Prevent
CID:		7040
This commit is contained in:
Edward Tomasz Napierala 2010-06-05 08:11:11 +00:00
parent dc5a530b04
commit 3e6ce93ee1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208815

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;