From 6657cfe70de94bf6ebd345800ef2eec8d4e04bd9 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Tue, 15 Apr 2008 22:54:03 +0100 Subject: [PATCH] dinput: Fix handle leak. --- dlls/dinput/joystick_linux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index e9b879021bf..5e87a0256cc 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);