From 7ceded5ed7cc8b061c16f65c33c3cfc50ebdcc69 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 8 May 2015 10:06:23 +0000 Subject: lib: Make sid_binstring_hex use TALLOC talloc_tos() is better than plain malloc... Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/libads/ldap_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/ldap_utils.c b/source3/libads/ldap_utils.c index 117dc557e25..157f6945421 100644 --- a/source3/libads/ldap_utils.c +++ b/source3/libads/ldap_utils.c @@ -214,20 +214,20 @@ static ADS_STATUS ads_do_search_retry_args(ADS_STRUCT *ads, const char *bind_pat char *dn, *sid_string; ADS_STATUS status; - sid_string = sid_binstring_hex(sid); + sid_string = sid_binstring_hex_talloc(talloc_tos(), sid); if (sid_string == NULL) { return ADS_ERROR(LDAP_NO_MEMORY); } if (!asprintf(&dn, "", sid_string)) { - SAFE_FREE(sid_string); + TALLOC_FREE(sid_string); return ADS_ERROR(LDAP_NO_MEMORY); } status = ads_do_search_retry(ads, dn, LDAP_SCOPE_BASE, "(objectclass=*)", attrs, res); SAFE_FREE(dn); - SAFE_FREE(sid_string); + TALLOC_FREE(sid_string); return status; } -- cgit v1.2.1