From 0a98d909952c658d754c3d33594f58d8d30c21cf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 23 Aug 2006 05:08:55 +0000 Subject: r17740: get rid of dependence on asprintf(), using talloc_asprintf() instead (This used to be commit 0e350ea0c1bba278995da5e8de677c5651eb623e) --- source4/lib/ldb/tools/ldbtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/ldb/tools/ldbtest.c') diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c index 62d8b84061..98449ae16b 100644 --- a/source4/lib/ldb/tools/ldbtest.c +++ b/source4/lib/ldb/tools/ldbtest.c @@ -225,7 +225,7 @@ static void search_uid(struct ldb_context *ldb, struct ldb_dn *basedn, int nreco struct ldb_result *res = NULL; int ret; - asprintf(&expr, "(uid=TEST%d)", uid); + expr = talloc_asprintf(ldb, "(uid=TEST%d)", uid); ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res); if (ret != LDB_SUCCESS || (uid < nrecords && res->count != 1)) { @@ -242,7 +242,7 @@ static void search_uid(struct ldb_context *ldb, struct ldb_dn *basedn, int nreco fflush(stdout); talloc_free(res); - free(expr); + talloc_free(expr); } printf("\n"); -- cgit