Rémi Bernon : hid/tests: Call CancelIo before closing device.

Alexandre Julliard julliard at winehq.org
Wed Feb 12 16:21:08 CST 2020


Module: wine
Branch: master
Commit: d63c7afc2043a0b3eb44feb370a8a974239a3c4c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d63c7afc2043a0b3eb44feb370a8a974239a3c4c

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Feb 11 19:13:43 2020 +0100

hid/tests: Call CancelIo before closing device.

This was causing some leak to be reported on wineserver shutdown when
no data can be read from a device.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hid/tests/device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/hid/tests/device.c b/dlls/hid/tests/device.c
index bb819cc83f..19f450045f 100644
--- a/dlls/hid/tests/device.c
+++ b/dlls/hid/tests/device.c
@@ -316,6 +316,7 @@ static void test_read_device(void)
     CloseHandle(overlapped.hEvent);
     rc = HidD_FreePreparsedData(ppd);
     ok(rc, "Failed to free preparsed data(0x%x)\n", GetLastError());
+    CancelIo(device);
     CloseHandle(device);
     HeapFree(GetProcessHeap(), 0, data);
     HeapFree(GetProcessHeap(), 0, report);




More information about the wine-cvs mailing list