aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/chgrp.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-02-22 12:03:17 -0600
committerRob Landley <rob@landley.net>2013-02-22 12:03:17 -0600
commit799515eabe6de341393efecf3756b3f80b18c9af (patch)
tree9dadb609c75373b3c63b6cce35c73a953f4b2ffa /toys/posix/chgrp.c
parentdd009d622ad7b6094efe073f0974a5e3a523cc32 (diff)
downloadtoybox-799515eabe6de341393efecf3756b3f80b18c9af.tar.gz
Fix a warning when debug code enabled.
Diffstat (limited to 'toys/posix/chgrp.c')
-rw-r--r--toys/posix/chgrp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/posix/chgrp.c b/toys/posix/chgrp.c
index e416f27f..0a314c2a 100644
--- a/toys/posix/chgrp.c
+++ b/toys/posix/chgrp.c
@@ -90,6 +90,7 @@ void chgrp_main(void)
if (!p && isdigit(*own)) p=getpwuid(atoi(own));
if (!p) error_exit("no user '%s'", own);
TT.owner = p->pw_uid;
+ if (CFG_TOYBOX_FREE) free(own);
}
} else TT.group_name = *toys.optargs;
@@ -106,6 +107,4 @@ void chgrp_main(void)
if (new) dirtree_handle_callback(new, do_chgrp);
else toys.exitval = 1;
}
-
- if (CFG_TOYBOX_FREE) free(own);
}