summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbrename.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tools/ldbrename.c')
-rw-r--r--source4/lib/ldb/tools/ldbrename.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbrename.c b/source4/lib/ldb/tools/ldbrename.c
index bfccacc206..e0f258ce85 100644
--- a/source4/lib/ldb/tools/ldbrename.c
+++ b/source4/lib/ldb/tools/ldbrename.c
@@ -51,8 +51,9 @@ int main(int argc, const char **argv)
int ret;
struct ldb_cmdline *options;
struct ldb_dn *dn1, *dn2;
+ 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);
@@ -71,7 +72,7 @@ int main(int argc, const char **argv)
options->argv[0], options->argv[1], ldb_errstring(ldb));
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
return ret;
}