From 5767b578a0ad9db91bb5f4ca5e74615c663034a7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 30 Jun 2008 17:15:49 +0200 Subject: schema_fsmo: only set module->private_data in case we keep the struct for a long time metze (This used to be commit 82940f6ca120026378e6deb49a07becb2d581f45) --- source4/dsdb/samdb/ldb_modules/schema_fsmo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c index 8ceeba9804..bc1e60abb2 100644 --- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c +++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c @@ -54,6 +54,8 @@ static int schema_fsmo_init(struct ldb_module *module) NULL }; + module->private_data = NULL; + if (dsdb_get_schema(module->ldb)) { return ldb_next_init(module); } @@ -77,7 +79,6 @@ static int schema_fsmo_init(struct ldb_module *module) ldb_oom(module->ldb); return LDB_ERR_OPERATIONS_ERROR; } - module->private_data = schema_fsmo; schema = dsdb_new_schema(mem_ctx, lp_iconv_convenience(ldb_get_opaque(module->ldb, "loadparm"))); if (!schema) { @@ -246,7 +247,7 @@ static int schema_fsmo_init(struct ldb_module *module) return LDB_ERR_OPERATIONS_ERROR; } - talloc_steal(module, schema_fsmo); + module->private_data = talloc_steal(module, schema_fsmo); ldb_debug(module->ldb, LDB_DEBUG_TRACE, "schema_fsmo_init: we are master: %s\n", -- cgit