diff options
Diffstat (limited to 'source3/lib/system_smbd.c')
-rw-r--r-- | source3/lib/system_smbd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c index 081a07c019..c627ae6270 100644 --- a/source3/lib/system_smbd.c +++ b/source3/lib/system_smbd.c @@ -166,15 +166,10 @@ BOOL getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user, } if (sys_getgrouplist(user, primary_gid, temp_groups, &max_grp) == -1) { - gid_t *groups_tmp; - - groups_tmp = SMB_REALLOC_ARRAY(temp_groups, gid_t, max_grp); - - if (!groups_tmp) { - SAFE_FREE(temp_groups); + temp_groups = SMB_REALLOC_ARRAY(temp_groups, gid_t, max_grp); + if (!temp_groups) { return False; } - temp_groups = groups_tmp; if (sys_getgrouplist(user, primary_gid, temp_groups, &max_grp) == -1) { |