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/libnet/libnet_join.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libnet') diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index ccfd943a8d..fe9fd66fdc 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -303,7 +303,7 @@ static ADS_STATUS libnet_join_find_machine_acct(TALLOC_CTX *mem_ctx, goto done; } - dn = ads_get_dn(r->in.ads, res); + dn = ads_get_dn(r->in.ads, mem_ctx, res); if (!dn) { status = ADS_ERROR_LDAP(LDAP_NO_MEMORY); goto done; @@ -317,7 +317,7 @@ static ADS_STATUS libnet_join_find_machine_acct(TALLOC_CTX *mem_ctx, done: ads_msgfree(r->in.ads, res); - ads_memfree(r->in.ads, dn); + TALLOC_FREE(dn); return status; } -- cgit