From 279690e3e78e5eecac95bb566fed8f5e67f5af12 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier Date: Sat, 17 Jan 2009 12:31:39 +0100 Subject: [PATCH] winejoystick.drv: Fix file descriptor leak. --- dlls/winejoystick.drv/joystick.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winejoystick.drv/joystick.c b/dlls/winejoystick.drv/joystick.c index 41d6eb8dbf1..38fb0cf4993 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; }