summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 14:00:02 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 14:00:02 +0100
commitdd111804f6b22e36fe9753c6f805f0f7ae43af15 (patch)
treec4fba861c320b5c616d80a1471881429e52be2a1
parent43bb87f5fa8fb23aee816636cefeb509397e7291 (diff)
downloadsamba-dd111804f6b22e36fe9753c6f805f0f7ae43af15.tar.gz
samba-dd111804f6b22e36fe9753c6f805f0f7ae43af15.tar.bz2
samba-dd111804f6b22e36fe9753c6f805f0f7ae43af15.zip
s4:registry - "RPC backend" - use "talloc_steal" and not "talloc_reference"
No need to create additional references but we need to assign the strings to the right context.
-rw-r--r--source4/lib/registry/rpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c
index f3be79b9ea..ada9a55c9e 100644
--- a/source4/lib/registry/rpc.c
+++ b/source4/lib/registry/rpc.c
@@ -229,7 +229,7 @@ static WERROR rpc_get_value_by_index(TALLOC_CTX *mem_ctx,
return ntstatus_to_werror(status);
}
- *value_name = talloc_reference(mem_ctx, r.out.name->name);
+ *value_name = talloc_steal(mem_ctx, r.out.name->name);
*type = *(r.out.type);
*data = data_blob_talloc(mem_ctx, r.out.value, *r.out.length);
@@ -319,9 +319,9 @@ static WERROR rpc_get_subkey_by_index(TALLOC_CTX *mem_ctx,
}
if (name != NULL)
- *name = talloc_reference(mem_ctx, r.out.name->name);
+ *name = talloc_steal(mem_ctx, r.out.name->name);
if (keyclass != NULL)
- *keyclass = talloc_reference(mem_ctx, r.out.keyclass->name);
+ *keyclass = talloc_steal(mem_ctx, r.out.keyclass->name);
if (last_changed_time != NULL)
*last_changed_time = *(r.out.last_changed_time);
@@ -394,7 +394,7 @@ static WERROR rpc_query_key(TALLOC_CTX *mem_ctx, const struct registry_key *k)
return ntstatus_to_werror(status);
}
- mykeydata->classname = talloc_reference(mem_ctx, r.out.classname->name);
+ mykeydata->classname = talloc_steal(mem_ctx, r.out.classname->name);
return r.out.result;
}