[NTOSKRNL]

- Fix a major bug in the failure path of IoCreateDevice that would cause corruption of kernel memory if IopCreateVpb failed

svn path=/trunk/; revision=56014
This commit is contained in:
Cameron Gutman 2012-03-04 21:18:01 +00:00
parent f8ada9b34d
commit 28a5fcc313

View file

@ -978,8 +978,8 @@ IoCreateDevice(IN PDRIVER_OBJECT DriverObject,
Status = IopCreateVpb(CreatedDeviceObject);
if (!NT_SUCCESS(Status))
{
/* Reference the device object and fail */
ObDereferenceObject(DeviceObject);
/* Dereference the device object and fail */
ObDereferenceObject(CreatedDeviceObject);
return Status;
}