summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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) {