From 34e02ea01437f1d5e9cd24f438753ab41766cafe Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 13 Mar 2006 00:30:18 +0000 Subject: r14270: Fix coverity #203. Ensure we free on error exit. Jeremy. (This used to be commit 9fa2e1bdedb61557b43f86c2898b7bf8762bbb63) --- source3/nsswitch/winbindd_group.c | 4 ++-- 1 file 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 -- cgit