From 45ba09457eadc8832ff40d2f8c0d5a6cc14ae3f3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 1 Jul 2009 14:02:12 +1000 Subject: [PATCH] fixed the reference to the global_schema --- source4/dsdb/schema/schema_set.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 976abc2463bc..8b1188a1b5bf 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -433,10 +433,11 @@ void dsdb_make_schema_global(struct ldb_context *ldb) } if (global_schema) { - talloc_unlink(talloc_autofree_context(), schema); + talloc_unlink(talloc_autofree_context(), global_schema); } - talloc_steal(talloc_autofree_context(), schema); + /* we want the schema to be around permanently */ + talloc_reference(talloc_autofree_context(), schema); global_schema = schema; dsdb_set_global_schema(ldb); -- 2.34.1