mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
- Fix a potential crash in IoGetLowerDeviceObject if nothing is attached to us
svn path=/trunk/; revision=41249
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user