mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
- Fix a potential crash in IoGetLowerDeviceObject if nothing is attached to us
svn path=/trunk/; revision=41249
This commit is contained in:
parent
e4a0b00377
commit
e640466446
|
@ -1186,8 +1186,12 @@ IoGetLowerDeviceObject(IN PDEVICE_OBJECT DeviceObject)
|
|||
/* Get the Lower Device Object */
|
||||
LowerDeviceObject = DeviceExtension->AttachedTo;
|
||||
|
||||
/* Reference it */
|
||||
ObReferenceObject(LowerDeviceObject);
|
||||
/* Check that we got a valid device object */
|
||||
if (LowerDeviceObject)
|
||||
{
|
||||
/* We did so let's reference it */
|
||||
ObReferenceObject(LowerDeviceObject);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return it */
|
||||
|
|
Loading…
Reference in a new issue