Commit 6657cfe7 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dinput: Fix handle leak.

parent 160945e2
...@@ -151,6 +151,8 @@ static INT find_joystick_devices(void) ...@@ -151,6 +151,8 @@ static INT find_joystick_devices(void)
if ((fd = open(device_name, O_RDONLY)) < 0) continue; if ((fd = open(device_name, O_RDONLY)) < 0) continue;
} }
close(fd);
if (!(str = HeapAlloc(GetProcessHeap(), 0, len))) break; if (!(str = HeapAlloc(GetProcessHeap(), 0, len))) break;
memcpy(str, device_name, len); memcpy(str, device_name, len);
......
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