hidclass.sys: Do not use device after free.
Spotted by Marcus Meissner (Coverity issue 1372459). Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6d5048d560
commit
3af89f1d96
|
@ -255,8 +255,9 @@ NTSTATUS WINAPI HID_PNP_Dispatch(DEVICE_OBJECT *device, IRP *irp)
|
|||
}
|
||||
case IRP_MN_REMOVE_DEVICE:
|
||||
{
|
||||
rc = minidriver->PNPDispatch(device, irp);
|
||||
HID_DeleteDevice(&minidriver->minidriver, device);
|
||||
return minidriver->PNPDispatch(device, irp);
|
||||
return rc;
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue