From 20501876735fc4656083747ba8aa0de9da8fb820 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 18 Mar 2009 17:35:03 +1100 Subject: s3:libads Make ads_get_dn() take a talloc context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also remove ads_memfree(), which was only ever a wrapper around SAFE_FREE, used only to free the DN from ads_get_ds(). This actually makes libgpo more consistant, as it mixed a talloc and a malloc based string on the same element. Andrew Bartlett Signed-off-by: Günther Deschner --- source3/winbindd/winbindd_ads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/winbindd/winbindd_ads.c') diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index a76faa7a25..dcf5623d29 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -865,7 +865,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, goto done; } - user_dn = ads_get_dn(ads, msg); + user_dn = ads_get_dn(ads, mem_ctx, msg); if (user_dn == NULL) { status = NT_STATUS_NO_MEMORY; goto done; @@ -942,7 +942,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, DEBUG(3,("ads lookup_usergroups (tokenGroups) succeeded for sid=%s\n", sid_string_dbg(sid))); done: - ads_memfree(ads, user_dn); + TALLOC_FREE(user_dn); ads_msgfree(ads, msg); return status; } -- cgit