diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-06-30 17:15:49 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-06-30 17:40:01 +0200 |
commit | 5767b578a0ad9db91bb5f4ca5e74615c663034a7 (patch) | |
tree | 49ce69bac571d642343ab7fbb85b6f3861b1b888 | |
parent | c88ec856bd88a22e281cd9cf99ad2828d4bbbe2b (diff) | |
download | samba-5767b578a0ad9db91bb5f4ca5e74615c663034a7.tar.gz samba-5767b578a0ad9db91bb5f4ca5e74615c663034a7.tar.bz2 samba-5767b578a0ad9db91bb5f4ca5e74615c663034a7.zip |
schema_fsmo: only set module->private_data in case we keep the struct for a long time
metze
(This used to be commit 82940f6ca120026378e6deb49a07becb2d581f45)
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/schema_fsmo.c | 5 |
1 files changed, 3 insertions, 2 deletions
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", |