Author: cgutman
Date: Sun Mar 4 21:18:01 2012
New Revision: 56014
URL:
http://svn.reactos.org/svn/reactos?rev=56014&view=rev
Log:
[NTOSKRNL]
- Fix a major bug in the failure path of IoCreateDevice that would cause corruption of
kernel memory if IopCreateVpb failed
Modified:
trunk/reactos/ntoskrnl/io/iomgr/device.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/device.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/device.c [iso-8859-1] Sun Mar 4 21:18:01 2012
@@ -978,8 +978,8 @@
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;
}