s4:dsdb Set partitions metadata as soon as it is set up.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 22 Oct 2009 04:54:12 +0000 (15:54 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 23 Oct 2009 04:40:49 +0000 (15:40 +1100)
source4/dsdb/samdb/ldb_modules/partition_init.c

index f4163dab3d4e7a390403d4b31dc6f5c34c725c69..2a1f34e9bcb15b64d2cf06fca841a7c519991371 100644 (file)
@@ -742,6 +742,9 @@ int partition_init(struct ldb_module *module)
                return ret;
        }
 
+       module->private_data = talloc_steal(module, data);
+       talloc_free(mem_ctx);
+
        ret = ldb_mod_register_control(module, LDB_CONTROL_DOMAIN_SCOPE_OID);
        if (ret != LDB_SUCCESS) {
                ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_ERROR,
@@ -756,8 +759,5 @@ int partition_init(struct ldb_module *module)
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
-       module->private_data = talloc_steal(module, data);
-
-       talloc_free(mem_ctx);
        return ldb_next_init(module);
 }