Module: wine Branch: master Commit: 6657cfe70de94bf6ebd345800ef2eec8d4e04bd9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6657cfe70de94bf6ebd345800e...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Tue Apr 15 22:54:03 2008 +0100
dinput: Fix handle leak.
---
dlls/dinput/joystick_linux.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
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);