diff options
Diffstat (limited to 'source4/lib/ldb/tools/ldbsearch.c')
-rw-r--r-- | source4/lib/ldb/tools/ldbsearch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c index 327a75ed8d..179646c73f 100644 --- a/source4/lib/ldb/tools/ldbsearch.c +++ b/source4/lib/ldb/tools/ldbsearch.c @@ -271,8 +271,9 @@ int main(int argc, const char **argv) struct ldb_cmdline *options; int ret = -1; const char *expression = "(|(objectClass=*)(distinguishedName=*))"; + TALLOC_CTX *mem_ctx = talloc_new(NULL); - ldb = ldb_init(NULL, NULL); + ldb = ldb_init(mem_ctx, NULL); if (ldb == NULL) { return -1; } @@ -311,6 +312,7 @@ int main(int argc, const char **argv) ret = do_search(ldb, basedn, options, expression, attrs); } - talloc_free(ldb); + talloc_free(mem_ctx); + return ret; } |