summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbadd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tools/ldbadd.c')
-rw-r--r--source4/lib/ldb/tools/ldbadd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c
index 0dd35cc1b3..e057b873a8 100644
--- a/source4/lib/ldb/tools/ldbadd.c
+++ b/source4/lib/ldb/tools/ldbadd.c
@@ -95,8 +95,9 @@ int main(int argc, const char **argv)
struct ldb_context *ldb;
unsigned int i, count = 0;
int ret=0;
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
- ldb = ldb_init(NULL, NULL);
+ ldb = ldb_init(mem_ctx, NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);
@@ -130,7 +131,7 @@ int main(int argc, const char **argv)
ldb_transaction_cancel(ldb);
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
printf("Added %d records with %d failures\n", count, failures);