diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-05-02 15:53:14 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-05-02 18:25:13 +0200 |
commit | 7cbcf652c51d283ac55b898c60ea39e45a48e5dd (patch) | |
tree | 54a54125a0fab5f3cd96a03bb0235c5c1d39fcde /source4/lib/ldb/tools/ldbdel.c | |
parent | df6d0db21d31dee1bc51c3a0703e1ad9ab5f028b (diff) | |
download | samba-7cbcf652c51d283ac55b898c60ea39e45a48e5dd.tar.gz samba-7cbcf652c51d283ac55b898c60ea39e45a48e5dd.tar.xz samba-7cbcf652c51d283ac55b898c60ea39e45a48e5dd.zip |
s4-ldb: use a parent context in the ldb utils
This avoids a talloc free with references error on exit
Diffstat (limited to 'source4/lib/ldb/tools/ldbdel.c')
-rw-r--r-- | source4/lib/ldb/tools/ldbdel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c index 04884e1becb..6994b3ddb68 100644 --- a/source4/lib/ldb/tools/ldbdel.c +++ b/source4/lib/ldb/tools/ldbdel.c @@ -87,8 +87,9 @@ int main(int argc, const char **argv) struct ldb_cmdline *options; struct ldb_context *ldb; int ret = 0, i; + 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); @@ -127,7 +128,7 @@ int main(int argc, const char **argv) } } - talloc_free(ldb); + talloc_free(mem_ctx); return ret; } |