diff options
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_winreg_spoolss.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c index 96de05a233..2b7215f9f4 100644 --- a/source3/rpc_client/cli_winreg_spoolss.c +++ b/source3/rpc_client/cli_winreg_spoolss.c @@ -2222,6 +2222,7 @@ WERROR winreg_delete_printer_dataex(TALLOC_CTX *mem_ctx, struct winreg_String wvalue = { 0, }; char *path; WERROR result = WERR_OK; + WERROR ignore; NTSTATUS status; TALLOC_CTX *tmp_ctx; @@ -2267,15 +2268,11 @@ WERROR winreg_delete_printer_dataex(TALLOC_CTX *mem_ctx, } done: - if (winreg_handle != NULL) { - WERROR ignore; - - if (is_valid_policy_hnd(&key_hnd)) { - dcerpc_winreg_CloseKey(winreg_handle, tmp_ctx, &key_hnd, &ignore); - } - if (is_valid_policy_hnd(&hive_hnd)) { - dcerpc_winreg_CloseKey(winreg_handle, tmp_ctx, &hive_hnd, &ignore); - } + if (is_valid_policy_hnd(&key_hnd)) { + dcerpc_winreg_CloseKey(winreg_handle, tmp_ctx, &key_hnd, &ignore); + } + if (is_valid_policy_hnd(&hive_hnd)) { + dcerpc_winreg_CloseKey(winreg_handle, tmp_ctx, &hive_hnd, &ignore); } TALLOC_FREE(tmp_ctx); |