aboutsummaryrefslogtreecommitdiffstats
path: root/man3/getgrouplist.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getgrouplist.3')
-rw-r--r--man3/getgrouplist.33
1 files changed, 2 insertions, 1 deletions
diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3
index 1fe260bda2..5332963701 100644
--- a/man3/getgrouplist.3
+++ b/man3/getgrouplist.3
@@ -163,6 +163,7 @@ main(int argc, char *argv[])
int ngroups;
struct passwd *pw;
struct group *gr;
+ gid_t *groups;
if (argc != 3) {
fprintf(stderr, "Usage: %s <user> <ngroups>\en", argv[0]);
@@ -171,7 +172,7 @@ main(int argc, char *argv[])
ngroups = atoi(argv[2]);
- gid_t *groups = malloc(sizeof(*groups) * ngroups);
+ groups = malloc(sizeof(*groups) * ngroups);
if (groups == NULL) {
perror("malloc");
exit(EXIT_FAILURE);