summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-12-10 06:21:18 +0000
committerTim Potter <tpot@samba.org>2001-12-10 06:21:18 +0000
commit31f036b5b3f8ed14e8450f22a376da4697ac9fa2 (patch)
tree8e15dfdcccbad971ea0dd5884dfd71b73156d0bb /source3/nsswitch
parent8c31fd48c8a2a509f3c9d2c21a450e3de6685389 (diff)
downloadsamba-31f036b5b3f8ed14e8450f22a376da4697ac9fa2.tar.gz
samba-31f036b5b3f8ed14e8450f22a376da4697ac9fa2.tar.bz2
samba-31f036b5b3f8ed14e8450f22a376da4697ac9fa2.zip
Merge of memory leak fixes from APPLIANCE_TNG.
(This used to be commit b198de92d2149ba2f5010c76e715d274b8f29c2a)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_group.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index e7b4541db0..abbd960e9d 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -753,6 +753,8 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
sizeof(struct acct_info) *
groups.num_sam_entries);
+ free(groups.sam_entries);
+
groups.sam_entries = NULL;
groups.num_sam_entries = 0;
}
@@ -809,6 +811,11 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
}
}
+ /* Free group data */
+
+ if (groups.sam_entries)
+ free(groups.sam_entries);
+
/* Assign extra_data fields in response structure */
if (extra_data) {