summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-09 22:03:52 +0200
committerVolker Lendecke <vl@samba.org>2009-07-09 22:25:29 +0200
commitc624a704be96488f0aee27930cbd4c8d99df464b (patch)
tree1bba78e5418e6b735e42ba44b2e2205236196d5d /source3/libads
parent2481ce89427ef38b47fb29d16c15b77e9d2c20b9 (diff)
downloadsamba-c624a704be96488f0aee27930cbd4c8d99df464b.tar.gz
samba-c624a704be96488f0aee27930cbd4c8d99df464b.tar.bz2
samba-c624a704be96488f0aee27930cbd4c8d99df464b.zip
Make escape_ldap_string take a talloc context
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap_user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c
index eecd9045e5..69dc05335e 100644
--- a/source3/libads/ldap_user.c
+++ b/source3/libads/ldap_user.c
@@ -30,18 +30,18 @@
ADS_STATUS status;
char *ldap_exp;
const char *attrs[] = {"*", NULL};
- char *escaped_user = escape_ldap_string_alloc(user);
+ char *escaped_user = escape_ldap_string(talloc_tos(), user);
if (!escaped_user) {
return ADS_ERROR(LDAP_NO_MEMORY);
}
if (asprintf(&ldap_exp, "(samAccountName=%s)", escaped_user) == -1) {
- SAFE_FREE(escaped_user);
+ TALLOC_FREE(escaped_user);
return ADS_ERROR(LDAP_NO_MEMORY);
}
status = ads_search(ads, res, ldap_exp, attrs);
SAFE_FREE(ldap_exp);
- SAFE_FREE(escaped_user);
+ TALLOC_FREE(escaped_user);
return status;
}