summaryrefslogtreecommitdiff
path: root/usr.sbin/chown
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2010-06-05 08:11:11 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2010-06-05 08:11:11 +0000
commit3e6ce93ee19f7a7206243e797d59926cb33817ad (patch)
tree1152b5765c4fe97924243a72af9d6bb89f5f128a /usr.sbin/chown
parentdc5a530b04653e15605c1421f13189b100ac7522 (diff)
downloadsrc-test-3e6ce93ee19f7a7206243e797d59926cb33817ad.tar.gz
src-test-3e6ce93ee19f7a7206243e797d59926cb33817ad.zip
Notes
Diffstat (limited to 'usr.sbin/chown')
-rw-r--r--usr.sbin/chown/chown.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c
index 0b09813a7e63e..e13235c3119e3 100644
--- a/usr.sbin/chown/chown.c
+++ b/usr.sbin/chown/chown.c
@@ -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;