mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user