mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[ACPI] acpi_create_registry_table(): Close the key handle, on errors (#3372)
Addendum to 44f1cf1
(r74559). CORE-12942
This commit is contained in:
parent
309ed0d1fe
commit
685f15e253
1 changed files with 3 additions and 0 deletions
|
@ -415,6 +415,7 @@ acpi_create_registry_table(HANDLE ParentKeyHandle, ACPI_TABLE_HEADER *OutTable,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("RtlAnsiStringToUnicodeString() for %s failed (Status 0x%08lx)\n", HardwareKeyNameA, Status);
|
||||
ZwClose(KeyHandle);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -444,6 +445,7 @@ acpi_create_registry_table(HANDLE ParentKeyHandle, ACPI_TABLE_HEADER *OutTable,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("RtlAnsiStringToUnicodeString() for %s failed (Status 0x%08lx)\n", HardwareKeyNameA, Status);
|
||||
ZwClose(KeyHandle);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -475,6 +477,7 @@ acpi_create_registry_table(HANDLE ParentKeyHandle, ACPI_TABLE_HEADER *OutTable,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("RtlStringCbPrintfW() for 0x%08lx failed (Status 0x%08lx)\n", OutTable->OemRevision, Status);
|
||||
ZwClose(KeyHandle);
|
||||
return Status;
|
||||
}
|
||||
RtlInitUnicodeString(&HardwareKeyName, OemRevision);
|
||||
|
|
Loading…
Reference in a new issue