From fe61b63393e1deaf98982841ce3693ee63af52f0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 15 Nov 2007 11:01:14 +0100 Subject: r25964: Fix comment and use talloc hirachy in ldb_tdb initialisation. Andrew Bartlett (This used to be commit 05cc2a7d966a10f1f111d7bae3261e1087fdffe6) --- source4/lib/ldb/ldb_tdb/ldb_cache.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source4/lib/ldb/ldb_tdb/ldb_cache.c') diff --git a/source4/lib/ldb/ldb_tdb/ldb_cache.c b/source4/lib/ldb/ldb_tdb/ldb_cache.c index 77922a97c7..2576e2c7bd 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_cache.c +++ b/source4/lib/ldb/ldb_tdb/ldb_cache.c @@ -307,7 +307,7 @@ int ltdb_cache_load(struct ldb_module *module) options = talloc(ltdb->cache, struct ldb_message); if (options == NULL) goto failed; - options_dn = ldb_dn_new(module, module->ldb, LTDB_OPTIONS); + options_dn = ldb_dn_new(options, module->ldb, LTDB_OPTIONS); if (options_dn == NULL) goto failed; r= ltdb_search_dn1(module, options_dn, options); @@ -315,7 +315,7 @@ int ltdb_cache_load(struct ldb_module *module) goto failed; } - /* possibly initialise the baseinfo */ + /* set flag for checking base DN on searches */ if (r == LDB_SUCCESS) { ltdb->check_base = ldb_msg_find_attr_as_bool(options, LTDB_CHECK_BASE, false); } else { @@ -350,7 +350,6 @@ int ltdb_cache_load(struct ldb_module *module) done: talloc_free(options); - talloc_free(options_dn); talloc_free(baseinfo); talloc_free(baseinfo_dn); talloc_free(indexlist_dn); @@ -358,7 +357,6 @@ done: failed: talloc_free(options); - talloc_free(options_dn); talloc_free(baseinfo); talloc_free(baseinfo_dn); talloc_free(indexlist_dn); -- cgit