summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2008-09-15 13:04:40 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-21 23:18:00 +0200
commit9b70485207735a8d4c1395963944e5a19a791f53 (patch)
tree02d1cc1921c3aa5217b60eb19728c41d76b65771 /source4
parentdb829f04adc27764a4a53ae94bc24c64e143e024 (diff)
downloadsamba-9b70485207735a8d4c1395963944e5a19a791f53.tar.gz
samba-9b70485207735a8d4c1395963944e5a19a791f53.tar.bz2
samba-9b70485207735a8d4c1395963944e5a19a791f53.zip
Registry client library: Use "talloc_zero" to avoid uninitialized values
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/rpc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c
index 69da90128e..83c6dc762c 100644
--- a/source4/lib/registry/rpc.c
+++ b/source4/lib/registry/rpc.c
@@ -183,7 +183,7 @@ static WERROR rpc_key_put_rpc_data(TALLOC_CTX *mem_ctx, struct registry_key *k)
struct winreg_OpenKey r;
struct rpc_key_data *mykeydata;
- k->backend_data = mykeydata = talloc(mem_ctx, struct rpc_key_data);
+ k->backend_data = mykeydata = talloc_zero(mem_ctx, struct rpc_key_data);
mykeydata->num_values = -1;
mykeydata->num_subkeys = -1;
@@ -211,8 +211,7 @@ static WERROR rpc_open_key(TALLOC_CTX *mem_ctx, struct registry_key *h,
struct winreg_OpenKey r;
NTSTATUS status;
- mykeydata = talloc(mem_ctx, struct rpc_key);
-
+ mykeydata = talloc_zero(mem_ctx, struct rpc_key);
mykeydata->key.context = parentkeydata->key.context;
mykeydata->pipe = talloc_reference(mykeydata, parentkeydata->pipe);
mykeydata->num_values = -1;