mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[NTOS:PNP] Fix GCC build (ignoring return value) (#4473)
[NTOS:PNP] Fix GCC build (ignoring return value)
Properly handle RtlDuplicateUnicodeString return status. Addendum to de316477
. Thanks to @HBelusca and @Doug-Lyons.
This commit is contained in:
parent
de316477b9
commit
55065d3b51
1 changed files with 8 additions and 2 deletions
|
@ -245,8 +245,14 @@ IopInitializeDevice(
|
|||
}
|
||||
|
||||
/* Set the device instance of the device node */
|
||||
RtlDuplicateUnicodeString(0, &DeviceInstance, &DeviceNode->InstancePath);
|
||||
|
||||
Status = RtlDuplicateUnicodeString(0, &DeviceInstance, &DeviceNode->InstancePath);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("RtlDuplicateUnicodeString() failed (Status 0x%08lx)\n", Status);
|
||||
IopFreeDeviceNode(DeviceNode);
|
||||
IoDeleteDevice(DeviceObject);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Insert as a root enumerated device node */
|
||||
PiInsertDevNode(DeviceNode, IopRootDeviceNode);
|
||||
|
|
Loading…
Reference in a new issue