git.samba.org
/
idra
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe7e4ac
)
s3-rpc_client: Close hive if opening of the key fails.
author
Andreas Schneider
<asn@samba.org>
Mon, 25 Jul 2011 20:31:08 +0000
(22:31 +0200)
committer
Andreas Schneider
<asn@samba.org>
Wed, 27 Jul 2011 06:49:58 +0000
(08:49 +0200)
source3/rpc_client/cli_winreg_spoolss.c
patch
|
blob
|
history
diff --git
a/source3/rpc_client/cli_winreg_spoolss.c
b/source3/rpc_client/cli_winreg_spoolss.c
index 9b7c72421cedb9470724a40662a3e51328394d31..d0c048c3cc85f4bbaf201fa2b45e61a7b04e5e65 100644
(file)
--- a/
source3/rpc_client/cli_winreg_spoolss.c
+++ b/
source3/rpc_client/cli_winreg_spoolss.c
@@
-298,9
+298,19
@@
static WERROR winreg_printer_openkey(TALLOC_CTX *mem_ctx,
&result);
}
if (!NT_STATUS_IS_OK(status)) {
- re
turn
ntstatus_to_werror(status);
+ re
sult =
ntstatus_to_werror(status);
}
if (!W_ERROR_IS_OK(result)) {
+ WERROR ignore;
+
+ if (is_valid_policy_hnd(hive_handle)) {
+ dcerpc_winreg_CloseKey(binding_handle,
+ mem_ctx,
+ hive_handle,
+ &ignore);
+ }
+ ZERO_STRUCTP(hive_handle);
+
return result;
}