diff options
-rw-r--r-- | source3/nsswitch/winbindd_group.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 6e125c4330..38d47ca3d7 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -827,8 +827,6 @@ void winbindd_getgrent(struct winbindd_cli_state *state) [group_list_ndx * sizeof(struct winbindd_gr)], gr_mem_list, gr_mem_list_len); - SAFE_FREE(gr_mem_list); - state->response.length += gr_mem_list_len; DEBUG(10, ("returning %d groups, length = %d\n", @@ -838,6 +836,8 @@ void winbindd_getgrent(struct winbindd_cli_state *state) done: + SAFE_FREE(gr_mem_list); + if (group_list_ndx > 0) request_ok(state); else |