mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[NTOS]: Code formatting + free the memory in the reverse order from how it was allocated.
svn path=/trunk/; revision=74494
This commit is contained in:
parent
837c766030
commit
32b595761c
1 changed files with 10 additions and 9 deletions
|
@ -878,7 +878,7 @@ IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode,
|
|||
&ValueName,
|
||||
0,
|
||||
REG_DWORD,
|
||||
(PVOID)&DeviceNode->CapabilityFlags,
|
||||
&DeviceNode->CapabilityFlags,
|
||||
sizeof(ULONG));
|
||||
|
||||
/* Set 'UINumber' value */
|
||||
|
@ -1077,6 +1077,7 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("PnpRootCreateDevice() failed with status 0x%08X\n", Status);
|
||||
ExFreePool(FullServiceName.Buffer);
|
||||
ExFreePoolWithTag(Node, TAG_IO_DEVNODE);
|
||||
return Status;
|
||||
}
|
||||
|
@ -1086,8 +1087,8 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ZwClose(InstanceHandle);
|
||||
ExFreePoolWithTag(Node, TAG_IO_DEVNODE);
|
||||
ExFreePool(FullServiceName.Buffer);
|
||||
ExFreePoolWithTag(Node, TAG_IO_DEVNODE);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -1095,8 +1096,8 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode,
|
|||
if (!Node->ServiceName.Buffer)
|
||||
{
|
||||
ZwClose(InstanceHandle);
|
||||
ExFreePoolWithTag(Node, TAG_IO_DEVNODE);
|
||||
ExFreePool(FullServiceName.Buffer);
|
||||
ExFreePoolWithTag(Node, TAG_IO_DEVNODE);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -1738,7 +1739,7 @@ IopGetParentIdPrefix(PDEVICE_NODE DeviceNode,
|
|||
&ValueName,
|
||||
0,
|
||||
REG_SZ,
|
||||
(PVOID)KeyValue.Buffer,
|
||||
KeyValue.Buffer,
|
||||
((ULONG)wcslen(KeyValue.Buffer) + 1) * sizeof(WCHAR));
|
||||
|
||||
cleanup:
|
||||
|
|
Loading…
Reference in a new issue