[NTOS:IO] Check RtlCreateUnicodeString return value when initializing PnP services

CORE-17637
This commit is contained in:
Jérôme Gardou 2021-06-17 16:38:32 +02:00 committed by Jérôme Gardou
parent 24a4e12a76
commit 3f16c8615c

View file

@ -435,8 +435,11 @@ IopInitializePlugPlayServices(VOID)
DNF_IDS_QUERIED | DNF_NO_RESOURCE_REQUIRED;
/* Create instance path */
RtlCreateUnicodeString(&IopRootDeviceNode->InstancePath,
REGSTR_VAL_ROOT_DEVNODE);
if (!RtlCreateUnicodeString(&IopRootDeviceNode->InstancePath, REGSTR_VAL_ROOT_DEVNODE))
{
DPRINT1("RtlCreateUnicodeString() failed\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
/* Call the add device routine */
IopRootDriverObject->DriverExtension->AddDevice(IopRootDriverObject,