From fe4d985b6f3d318d9b58a16677be3b4ae34fba15 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 25 Apr 2005 12:46:18 +0000 Subject: r6470: Remove ldb_search_free() it is not needed anymore. Just use talloc_free() to release the memory after an ldb_search(). (This used to be commit 4f0948dab0aa5e8b6a4ce486f3668ca8dfae23db) --- source4/dsdb/samdb/samdb.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'source4/dsdb/samdb/samdb.c') diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 6f9251dd32..b337577ae7 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -78,15 +78,6 @@ int samdb_search_domain(struct ldb_context *sam_ldb, return count; } -/* - free up a search result -*/ -int samdb_search_free(struct ldb_context *sam_ldb, - TALLOC_CTX *mem_ctx, struct ldb_message **res) -{ - return ldb_search_free(sam_ldb, res); -} - /* search the sam for a single string attribute in exactly 1 record */ @@ -106,7 +97,7 @@ const char *samdb_search_string_v(struct ldb_context *sam_ldb, attr_name, format, count)); } if (count != 1) { - samdb_search_free(sam_ldb, mem_ctx, res); + talloc_free(res); return NULL; } @@ -235,14 +226,14 @@ int samdb_search_string_multiple(struct ldb_context *sam_ldb, if (res[i]->num_elements != 1) { DEBUG(1,("samdb: search for %s %s not single valued\n", attr_name, format)); - samdb_search_free(sam_ldb, mem_ctx, res); + talloc_free(res); return -1; } } *strs = talloc_array(mem_ctx, const char *, count+1); if (! *strs) { - samdb_search_free(sam_ldb, mem_ctx, res); + talloc_free(res); return -1; } -- cgit