Vincent Pelletier : winejoystick.drv: Fix file descriptor leak.

Alexandre Julliard julliard at winehq.org
Tue Jan 20 08:27:51 CST 2009


Module: wine
Branch: master
Commit: 279690e3e78e5eecac95bb566fed8f5e67f5af12
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=279690e3e78e5eecac95bb566fed8f5e67f5af12

Author: Vincent Pelletier <plr.vincent at gmail.com>
Date:   Sat Jan 17 12:31:39 2009 +0100

winejoystick.drv: Fix file descriptor leak.

---

 dlls/winejoystick.drv/joystick.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/winejoystick.drv/joystick.c b/dlls/winejoystick.drv/joystick.c
index 41d6eb8..38fb0cf 100644
--- a/dlls/winejoystick.drv/joystick.c
+++ b/dlls/winejoystick.drv/joystick.c
@@ -178,8 +178,9 @@ static	int	JSTCK_OpenDevice(WINE_JSTCK* jstick)
 #endif
     if ((jstick->dev = open(buf, flags)) < 0) {
         sprintf(buf, JOYDEV_OLD, jstick->joyIntf);
+        jstick->dev = open(buf, flags);
     }
-    return (jstick->dev = open(buf, flags));
+    return jstick->dev;
 }
 
 




More information about the wine-cvs mailing list