summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-05-08 10:06:23 +0000
committerJeremy Allison <jra@samba.org>2015-05-13 01:44:20 +0200
commit7ceded5ed7cc8b061c16f65c33c3cfc50ebdcc69 (patch)
treea8b185b4e5f1378eea90a8cc81c19a9625450db2 /source3/libads
parentb7c53a7de15d9167b98150e40eba4862458c2fdc (diff)
downloadsamba-7ceded5ed7cc8b061c16f65c33c3cfc50ebdcc69.tar.gz
lib: Make sid_binstring_hex use TALLOC
talloc_tos() is better than plain malloc... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap_utils.c6
1 files changed, 3 insertions, 3 deletions
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=%s>", 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;
}