ldb:ldb_tdb/ldb_cache.c - remove a superflous "talloc_free"
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 21 Oct 2010 07:03:31 +0000 (09:03 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 21 Oct 2010 07:09:04 +0000 (09:09 +0200)
Didn't realise that this is already called by "ltdb_attributes_unload".

source4/lib/ldb/ldb_tdb/ldb_cache.c

index f318166cebbc4507eca76ee78a4d14e9477ad789..697f7427a44e8b1aa188f1592e6a56aba60c28d7 100644 (file)
@@ -348,10 +348,8 @@ int ltdb_cache_load(struct ldb_module *module)
        talloc_free(ltdb->cache->last_attribute.name);
        memset(&ltdb->cache->last_attribute, 0, sizeof(ltdb->cache->last_attribute));
 
-       ltdb_attributes_unload(module);
-
        talloc_free(ltdb->cache->indexlist);
-       talloc_free(ltdb->cache->attributes);
+       ltdb_attributes_unload(module); /* calls internally "talloc_free" */
 
        ltdb->cache->indexlist = ldb_msg_new(ltdb->cache);
        ltdb->cache->attributes = ldb_msg_new(ltdb->cache);