mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3-rpc_client: Close hive if opening of the key fails.
This commit is contained in:
parent
fe7e4ac462
commit
a0597b75e6
@ -298,9 +298,19 @@ static WERROR winreg_printer_openkey(TALLOC_CTX *mem_ctx,
|
||||
&result);
|
||||
}
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return ntstatus_to_werror(status);
|
||||
result = 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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user