From 6eabad9c9d977c1c5c6ecf7494a0be42ad113d23 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 29 Nov 2005 12:34:03 +0000 Subject: r11958: - fixed memory leaks in the ldb_result handling in ldb operations - removed an unnecessary level of pointer in ldb_search structure (This used to be commit b8d4afb14a18dfd8bac79882a035e74d3ed312bd) --- source4/lib/ldb/modules/operational.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/ldb/modules/operational.c') diff --git a/source4/lib/ldb/modules/operational.c b/source4/lib/ldb/modules/operational.c index 7c554e8541..2fdd255e99 100644 --- a/source4/lib/ldb/modules/operational.c +++ b/source4/lib/ldb/modules/operational.c @@ -182,7 +182,7 @@ static int operational_search_bytree(struct ldb_module *module, struct ldb_reque const char * const *attrs = req->op.search.attrs; const char **search_attrs = NULL; - *(req->op.search.res) = NULL; + req->op.search.res = NULL; /* replace any attributes in the parse tree that are searchable, but are stored using a different name in the @@ -225,8 +225,8 @@ static int operational_search_bytree(struct ldb_module *module, struct ldb_reque /* for each record returned post-process to add any derived attributes that have been asked for */ - for (r = 0; r < (*(req->op.search.res))->count; r++) { - if (operational_search_post_process(module, (*(req->op.search.res))->msgs[r], attrs) != 0) { + for (r = 0; r < req->op.search.res->count; r++) { + if (operational_search_post_process(module, req->op.search.res->msgs[r], attrs) != 0) { goto failed; } } @@ -237,7 +237,7 @@ static int operational_search_bytree(struct ldb_module *module, struct ldb_reque failed: talloc_free(search_attrs); - talloc_free(*(req->op.search.res)); + talloc_free(req->op.search.res); ldb_oom(module->ldb); return LDB_ERR_OTHER; } -- cgit