r25964: Fix comment and use talloc hirachy in ldb_tdb initialisation.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 15 Nov 2007 10:01:14 +0000 (11:01 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:45:21 +0000 (05:45 +0100)
Andrew Bartlett
(This used to be commit 05cc2a7d966a10f1f111d7bae3261e1087fdffe6)

source4/lib/ldb/ldb_tdb/ldb_cache.c

index 77922a97c78f25bfe69460cdd46d54411eb32d46..2576e2c7bdee41932174322d2f346498db16664f 100644 (file)
@@ -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);