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/lib/ldb/modules/schema.c | 9 +-------- source4/lib/ldb/modules/skel.c | 7 ------- source4/lib/ldb/modules/timestamps.c | 7 ------- 3 files changed, 1 insertion(+), 22 deletions(-) (limited to 'source4/lib/ldb/modules') diff --git a/source4/lib/ldb/modules/schema.c b/source4/lib/ldb/modules/schema.c index 4502bba9ed..29e5194416 100644 --- a/source4/lib/ldb/modules/schema.c +++ b/source4/lib/ldb/modules/schema.c @@ -166,7 +166,7 @@ static int get_entry_attributes(struct ldb_context *ldb, const char *dn, struct /* set flags to 0 as flags on search have undefined values */ ret = get_msg_attributes(ss, *srch, 0); if (ret != 0) { - ldb_search_free(ldb, srch); + talloc_free(srch); return ret; } @@ -306,12 +306,6 @@ static int schema_search(struct ldb_module *module, const char *base, return ldb_next_search(module, base, scope, expression, attrs, res); } -/* search_free */ -static int schema_search_free(struct ldb_module *module, struct ldb_message **res) -{ - return ldb_next_search_free(module, res); -} - /* add_record */ static int schema_add_record(struct ldb_module *module, const struct ldb_message *msg) { @@ -549,7 +543,6 @@ static int schema_destructor(void *module_ctx) static const struct ldb_module_ops schema_ops = { "schema", schema_search, - schema_search_free, schema_add_record, schema_modify_record, schema_delete_record, diff --git a/source4/lib/ldb/modules/skel.c b/source4/lib/ldb/modules/skel.c index 882a776819..09f2452365 100644 --- a/source4/lib/ldb/modules/skel.c +++ b/source4/lib/ldb/modules/skel.c @@ -44,12 +44,6 @@ static int skel_search(struct ldb_module *module, const char *base, return ldb_next_search(module, base, scope, expression, attrs, res); } -/* search_free */ -static int skel_search_free(struct ldb_module *module, struct ldb_message **res) -{ - return ldb_next_search_free(module, res); -} - /* add_record */ static int skel_add_record(struct ldb_module *module, const struct ldb_message *msg) { @@ -102,7 +96,6 @@ static int skel_destructor(void *module_ctx) static const struct ldb_module_ops skel_ops = { "skel", skel_search, - skel_search_free, skel_add_record, skel_modify_record, skel_delete_record, diff --git a/source4/lib/ldb/modules/timestamps.c b/source4/lib/ldb/modules/timestamps.c index c472fc3c55..1c01bd14fd 100644 --- a/source4/lib/ldb/modules/timestamps.c +++ b/source4/lib/ldb/modules/timestamps.c @@ -49,12 +49,6 @@ static int timestamps_search(struct ldb_module *module, const char *base, return ldb_next_search(module, base, scope, expression, attrs, res); } -static int timestamps_search_free(struct ldb_module *module, struct ldb_message **res) -{ - ldb_debug(module->ldb, LDB_DEBUG_TRACE, "timestamps_search_free\n"); - return ldb_next_search_free(module, res); -} - static int add_time_element(struct ldb_module *module, struct ldb_message *msg, const char *attr_name, const char *time_string, unsigned int flags) { @@ -255,7 +249,6 @@ static int timestamps_destructor(void *module_ctx) static const struct ldb_module_ops timestamps_ops = { "timestamps", timestamps_search, - timestamps_search_free, timestamps_add_record, timestamps_modify_record, timestamps_delete_record, -- cgit