mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
- Swap the failure cases
- Missed change from r53301 svn path=/trunk/; revision=53303
This commit is contained in:
parent
4cf82b565f
commit
5a658d1d36
1 changed files with 7 additions and 7 deletions
|
@ -1155,7 +1155,14 @@ IoRegisterDeviceInterface(IN PDEVICE_OBJECT PhysicalDeviceObject,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("ZwSetValueKey() failed with status 0x%08lx\n", Status);
|
||||
ZwClose(SubKey);
|
||||
ZwClose(InterfaceKey);
|
||||
ZwClose(ClassKey);
|
||||
ExFreePool(SubKeyName.Buffer);
|
||||
ExFreePool(InterfaceKeyName.Buffer);
|
||||
ExFreePool(BaseKeyName.Buffer);
|
||||
ExFreePool(SymbolicLinkName->Buffer);
|
||||
return Status;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1174,14 +1181,7 @@ IoRegisterDeviceInterface(IN PDEVICE_OBJECT PhysicalDeviceObject,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("IoCreateSymbolicLink() failed with status 0x%08lx\n", Status);
|
||||
ZwClose(SubKey);
|
||||
ZwClose(InterfaceKey);
|
||||
ZwClose(ClassKey);
|
||||
ExFreePool(SubKeyName.Buffer);
|
||||
ExFreePool(InterfaceKeyName.Buffer);
|
||||
ExFreePool(BaseKeyName.Buffer);
|
||||
ExFreePool(SymbolicLinkName->Buffer);
|
||||
return Status;
|
||||
}
|
||||
|
||||
ZwClose(SubKey);
|
||||
|
|
Loading…
Reference in a new issue