diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-11-29 12:34:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:51 -0500 |
commit | 6eabad9c9d977c1c5c6ecf7494a0be42ad113d23 (patch) | |
tree | 96a9cf1b04fb6fe460f734cc53df409c65daa7a0 /source4/lib/ldb/modules/operational.c | |
parent | b77685a4ae40e6619d82af98e0def173b4f4b7ec (diff) | |
download | samba-6eabad9c9d977c1c5c6ecf7494a0be42ad113d23.tar.gz samba-6eabad9c9d977c1c5c6ecf7494a0be42ad113d23.tar.bz2 samba-6eabad9c9d977c1c5c6ecf7494a0be42ad113d23.zip |
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)
Diffstat (limited to 'source4/lib/ldb/modules/operational.c')
-rw-r--r-- | source4/lib/ldb/modules/operational.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |