From b213b35e08cb53eec47ceae87a52d3b0832a5914 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 3 May 2007 12:29:32 +0000 Subject: r22647: Avoid leaking a full info3 structure on each winbindd cached login by making netsamlogon_cache_get() return a talloc'ed structure. Guenther (This used to be commit 5b149967cc3ab68057db015e67b688c9b9577f0d) --- source3/nsswitch/winbindd_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/nsswitch/winbindd_util.c') diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 67f00e99bd..d8d7249c2d 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -984,7 +984,7 @@ NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain, } if (info3->num_groups == 0) { - SAFE_FREE(info3); + TALLOC_FREE(info3); return NT_STATUS_UNSUCCESSFUL; } @@ -992,7 +992,7 @@ NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain, sid_compose(&primary_group, &info3->dom_sid.sid, info3->user_rid); if (!add_sid_to_array(mem_ctx, &primary_group, user_sids, &num_groups)) { - SAFE_FREE(info3); + TALLOC_FREE(info3); return NT_STATUS_NO_MEMORY; } @@ -1002,12 +1002,12 @@ NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain, if (!add_sid_to_array(mem_ctx, &group_sid, user_sids, &num_groups)) { - SAFE_FREE(info3); + TALLOC_FREE(info3); return NT_STATUS_NO_MEMORY; } } - SAFE_FREE(info3); + TALLOC_FREE(info3); *p_num_groups = num_groups; status = (user_sids != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY; -- cgit