Commit 3af89f1d authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

hidclass.sys: Do not use device after free.

Spotted by Marcus Meissner (Coverity issue 1372459). Signed-off-by: 's avatarAric Stewart <aric@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6d5048d5
......@@ -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:
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment