diff options
Diffstat (limited to 'libpwdgrp')
-rw-r--r-- | libpwdgrp/pwd_grp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c index 3fe70f4..867caf0 100644 --- a/libpwdgrp/pwd_grp.c +++ b/libpwdgrp/pwd_grp.c @@ -643,11 +643,7 @@ int initgroups(const char *user, gid_t gid) if (group.gr_gid != gid) { for (m = group.gr_mem; *m; m++) { if (!strcmp(*m, user)) { - if (!(num_groups & 7)) { - gid_t *tmp = xrealloc(group_list, - (num_groups+8) * sizeof(gid_t *)); - group_list = tmp; - } + group_list = xrealloc_vector(group_list, 3, num_groups); group_list[num_groups++] = group.gr_gid; break; } |