Commit 279690e3 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Alexandre Julliard

winejoystick.drv: Fix file descriptor leak.

parent 3d97055b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment