Module: wine Branch: master Commit: 1c3b1c3fec25901db1dc9c21da5b04803ff7d3b5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c3b1c3fec25901db1dc9c21da...
Author: Marcus Meissner marcus@jet.franken.de Date: Sat Sep 15 20:17:11 2012 +0200
dinput: Added a missing close(fd) in disabled case (Coverity).
---
dlls/dinput/joystick_linux.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index ed2498b..a91c5e8 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -158,7 +158,10 @@ static INT find_joystick_devices(void) /* Append driver name */ strcat(joydev.name, JOYDEVDRIVER);
- if (device_disabled_registry(joydev.name)) continue; + if (device_disabled_registry(joydev.name)) { + close(fd); + continue; + }
#ifdef JSIOCGAXES if (ioctl(fd, JSIOCGAXES, &joydev.axis_count) < 0)