From 6e419551ae06abff4b19abb6ceb1978f8c58e353 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 26 Jul 2007 16:39:48 +0000 Subject: r24057: Fix some uninitialized variables found by the IBM checker (This used to be commit d74bbc53c2cf41e7e92309e81bb9c1b3f805cdd1) --- source3/utils/net_rpc_registry.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/utils/net_rpc_registry.c') diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index aac49dd7f9..0d54ff3907 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -70,6 +70,8 @@ static NTSTATUS registry_openkey(TALLOC_CTX *mem_ctx, NTSTATUS status; struct winreg_String key; + ZERO_STRUCT(key); + if (!reg_hive_key(name, &hive, &key.name)) { return NT_STATUS_INVALID_PARAMETER; } @@ -330,6 +332,8 @@ static NTSTATUS registry_setvalue(TALLOC_CTX *mem_ctx, return werror_to_ntstatus(err); } + ZERO_STRUCT(name_string); + name_string.name = name; result = rpccli_winreg_SetValue(pipe_hnd, blob.data, key_hnd, name_string, value->type, @@ -417,6 +421,8 @@ static NTSTATUS rpc_registry_deletevalue_internal(const DOM_SID *domain_sid, NTSTATUS status; struct winreg_String valuename; + ZERO_STRUCT(valuename); + status = registry_openkey(mem_ctx, pipe_hnd, argv[0], REG_KEY_WRITE, &hive_hnd, &key_hnd); if (!NT_STATUS_IS_OK(status)) { @@ -467,6 +473,9 @@ static NTSTATUS rpc_registry_createkey_internal(const DOM_SID *domain_sid, enum winreg_CreateAction action; NTSTATUS status; + ZERO_STRUCT(key); + ZERO_STRUCT(keyclass); + if (!reg_hive_key(argv[0], &hive, &key.name)) { return NT_STATUS_INVALID_PARAMETER; } @@ -533,6 +542,8 @@ static NTSTATUS rpc_registry_deletekey_internal(const DOM_SID *domain_sid, struct winreg_String key; NTSTATUS status; + ZERO_STRUCT(key); + if (!reg_hive_key(argv[0], &hive, &key.name)) { return NT_STATUS_INVALID_PARAMETER; } -- cgit