diff options
author | Volker Lendecke <vl@samba.org> | 2009-07-09 22:03:52 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-07-09 22:25:29 +0200 |
commit | c624a704be96488f0aee27930cbd4c8d99df464b (patch) | |
tree | 1bba78e5418e6b735e42ba44b2e2205236196d5d /source3/utils | |
parent | 2481ce89427ef38b47fb29d16c15b77e9d2c20b9 (diff) | |
download | samba-c624a704be96488f0aee27930cbd4c8d99df464b.tar.gz samba-c624a704be96488f0aee27930cbd4c8d99df464b.tar.bz2 samba-c624a704be96488f0aee27930cbd4c8d99df464b.zip |
Make escape_ldap_string take a talloc context
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_ads.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index d82715eb45..f746fc6bd5 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -521,7 +521,7 @@ static int ads_user_info(struct net_context *c, int argc, const char **argv) return net_ads_user_usage(c, argc, argv); } - escaped_user = escape_ldap_string_alloc(argv[0]); + escaped_user = escape_ldap_string(talloc_tos(), argv[0]); if (!escaped_user) { d_fprintf(stderr, "ads_user_info: failed to escape user %s\n", argv[0]); @@ -529,12 +529,12 @@ static int ads_user_info(struct net_context *c, int argc, const char **argv) } if (!ADS_ERR_OK(ads_startup(c, false, &ads))) { - SAFE_FREE(escaped_user); + TALLOC_FREE(escaped_user); return -1; } if (asprintf(&searchstring, "(sAMAccountName=%s)", escaped_user) == -1) { - SAFE_FREE(escaped_user); + TALLOC_FREE(escaped_user); return -1; } rc = ads_search(ads, &res, searchstring, attrs); @@ -543,7 +543,7 @@ static int ads_user_info(struct net_context *c, int argc, const char **argv) if (!ADS_ERR_OK(rc)) { d_fprintf(stderr, "ads_search: %s\n", ads_errstr(rc)); ads_destroy(&ads); - SAFE_FREE(escaped_user); + TALLOC_FREE(escaped_user); return -1; } @@ -563,7 +563,7 @@ static int ads_user_info(struct net_context *c, int argc, const char **argv) ads_msgfree(ads, res); ads_destroy(&ads); - SAFE_FREE(escaped_user); + TALLOC_FREE(escaped_user); return 0; } |