From e36ea2e8ebe44079dd3989694f0235e77caf4fe2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 17 Oct 2006 01:21:02 +0000 Subject: r19362: - don't need to store the baseinfo message after cache load - set better names on talloc structures in ldb modules, making leaks easier to track down (This used to be commit 3bf76db42dc6dde5d71083216dba819869b31c75) --- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/ldb/ldb_tdb') diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index b7a202442d..fd1c8780ae 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -1058,11 +1058,18 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, talloc_free(ltdb); return -1; } + talloc_set_name_const(*module, "ldb_tdb backend"); (*module)->ldb = ldb; (*module)->prev = (*module)->next = NULL; (*module)->private_data = ltdb; (*module)->ops = <db_ops; + if (ltdb_cache_load(*module) != 0) { + talloc_free(*module); + talloc_free(ltdb); + return -1; + } + return 0; } -- cgit