diff options
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_winreg_spoolss.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c index ebdd419a65..e3d8a3d205 100644 --- a/source3/rpc_client/cli_winreg_spoolss.c +++ b/source3/rpc_client/cli_winreg_spoolss.c @@ -1666,6 +1666,21 @@ WERROR winreg_get_printer_secdesc(TALLOC_CTX *mem_ctx, } if (!W_ERROR_IS_OK(result)) { if (W_ERROR_EQUAL(result, WERR_BADFILE)) { + 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); + } goto create_default; } goto done; |