summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-13 00:30:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:22 -0500
commit34e02ea01437f1d5e9cd24f438753ab41766cafe (patch)
treefe1cf6648c44b60ef7e1c5236bf31cf8070e3ac0 /source3
parentbb0d6f04598ea8eb489137f2a23d98ad9f9a0eee (diff)
downloadsamba-34e02ea01437f1d5e9cd24f438753ab41766cafe.tar.gz
samba-34e02ea01437f1d5e9cd24f438753ab41766cafe.tar.bz2
samba-34e02ea01437f1d5e9cd24f438753ab41766cafe.zip
r14270: Fix coverity #203. Ensure we free on error exit.
Jeremy. (This used to be commit 9fa2e1bdedb61557b43f86c2898b7bf8762bbb63)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_group.c4
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