[PATCH] hid: Handle overlapped file handles.
Zebediah Figura
z.figura12 at gmail.com
Tue Mar 12 21:16:27 CDT 2019
On 3/12/19 8:17 PM, Dmitry Timoshkov wrote:
> Zebediah Figura <z.figura12 at gmail.com> wrote:
>
>> +static BOOL sync_ioctl(HANDLE file, DWORD code, void *in_buf, DWORD in_len, void *out_buf, DWORD out_len, DWORD *ret_len)
>> +{
>> + OVERLAPPED ovl = {0};
>> + BOOL ret;
>> +
>> + ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
>> + ret = DeviceIoControl(file, code, in_buf, in_len, out_buf, out_len, ret_len, &ovl);
>> + if (!ret && GetLastError() == ERROR_IO_PENDING)
>> + ret = GetOverlappedResult(file, &ovl, ret_len, TRUE);
>> + return ret;
>> +}
>> +
>
> Are you leaking the ovl.hEvent handle?
>
Yes, I am. Thanks for spotting that.
More information about the wine-devel
mailing list