dinput: Fix handle leak

Andrew Talbot andrew.talbot at talbotville.com
Tue Apr 15 16:54:03 CDT 2008


Changelog:
    dinput: Fix handle leak.

diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index e9b8790..5e87a02 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -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);
 



More information about the wine-patches mailing list