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/libgpo/gpo_ldap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/libgpo/gpo_ldap.c') diff --git a/source3/libgpo/gpo_ldap.c b/source3/libgpo/gpo_ldap.c index 26813864e5..882804b09a 100644 --- a/source3/libgpo/gpo_ldap.c +++ b/source3/libgpo/gpo_ldap.c @@ -415,7 +415,7 @@ ADS_STATUS ads_delete_gpo_link(ADS_STRUCT *ads, if (gpo_dn) { gpo->ds_path = talloc_strdup(mem_ctx, gpo_dn); } else { - gpo->ds_path = ads_get_dn(ads, res); + gpo->ds_path = ads_get_dn(ads, mem_ctx, res); } ADS_ERROR_HAVE_NO_MEMORY(gpo->ds_path); @@ -523,7 +523,7 @@ ADS_STATUS ads_get_gpo(ADS_STRUCT *ads, return ADS_ERROR(LDAP_NO_SUCH_OBJECT); } - dn = ads_get_dn(ads, res); + dn = ads_get_dn(ads, mem_ctx, res); if (dn == NULL) { ads_msgfree(ads, res); return ADS_ERROR(LDAP_NO_MEMORY); @@ -531,7 +531,7 @@ ADS_STATUS ads_get_gpo(ADS_STRUCT *ads, status = ads_parse_gpo(ads, mem_ctx, res, dn, gpo); ads_msgfree(ads, res); - ads_memfree(ads, dn); + TALLOC_FREE(dn); return status; } -- cgit