mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
hidclass.sys: Handle failure to parse preparseData.
Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5fa0422227
commit
5fb6a94bb9
1 changed files with 9 additions and 1 deletions
|
@ -212,8 +212,16 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
|
|||
}
|
||||
|
||||
ext->preparseData = ParseDescriptor(reportDescriptor, descriptor.DescriptorList[0].wReportLength);
|
||||
ext->information.DescriptorSize = ext->preparseData->dwSize;
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, reportDescriptor);
|
||||
if (!ext->preparseData)
|
||||
{
|
||||
ERR("Cannot parse Report Descriptor\n");
|
||||
HID_DeleteDevice(&minidriver->minidriver, device);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
ext->information.DescriptorSize = ext->preparseData->dwSize;
|
||||
|
||||
serial[0] = 0;
|
||||
status = call_minidriver(IOCTL_HID_GET_STRING, device,
|
||||
|
|
Loading…
Reference in a new issue