dinput: Fix handle leak.

This commit is contained in:
Andrew Talbot 2008-04-15 22:54:03 +01:00 committed by Alexandre Julliard
parent 160945e217
commit 6657cfe70d
1 changed files with 2 additions and 0 deletions

View File

@ -151,6 +151,8 @@ static INT find_joystick_devices(void)
if ((fd = open(device_name, O_RDONLY)) < 0) continue;
}
close(fd);
if (!(str = HeapAlloc(GetProcessHeap(), 0, len))) break;
memcpy(str, device_name, len);