From 12f42e35bcbb819cb742c28538b7cc67ac9d93cf Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 22 Mar 2010 22:23:08 +0100 Subject: s4:registry - "reg_import_hive_key" - change a "talloc_steal" into a "talloc_reference" Use a "talloc_reference" since the "hive" variable can continue to exist also after the destructed "struct local_key" object. It is also referenced by the "mountpoints" structure under the "ctx" object. --- source4/lib/registry/local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c index 2ca31ec0eb..be48729f79 100644 --- a/source4/lib/registry/local.c +++ b/source4/lib/registry/local.c @@ -58,7 +58,7 @@ struct registry_key *reg_import_hive_key(struct registry_context *ctx, local_key = talloc(ctx, struct local_key); if (local_key != NULL) { - local_key->hive_key = talloc_steal(local_key, hive); + local_key->hive_key = talloc_reference(local_key, hive); local_key->global.context = talloc_reference(local_key, ctx); local_key->path = parent_path; } -- cgit