Closed Fullmetal5 closed 7 years ago
if IoCreateDevice
fails, it should not send STATUS_SUCCESS
. And I have a check for it. Does it still crashes?
Yea it still crashed, I was messing around and tried to set the DeviceName
to an already existing name and got this crash.
Your check makes sense it's just that any ANY error in IoCreateDevice
should leave DriverObject->DeviceObject
as NULL and thus cause the crash.
It is possible for IoCreateDevice to fail and leave DriverObject->DeviceObject as NULL which will cause a bug check when passed to IoDeleteDevice.