summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 22:23:08 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 22:31:08 +0100
commit12f42e35bcbb819cb742c28538b7cc67ac9d93cf (patch)
tree361b5a132e9db4e6d03f9ecffa7f300a857ea958 /source4/lib/registry
parente2466334a07062ca9c7160c8487386e1743d982a (diff)
downloadsamba-12f42e35bcbb819cb742c28538b7cc67ac9d93cf.tar.gz
samba-12f42e35bcbb819cb742c28538b7cc67ac9d93cf.tar.bz2
samba-12f42e35bcbb819cb742c28538b7cc67ac9d93cf.zip
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.
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/local.c2
1 files changed, 1 insertions, 1 deletions
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;
}