dinput: Added a missing close(fd) in disabled case (Coverity).
This commit is contained in:
parent
1104678b40
commit
1c3b1c3fec
|
@ -158,7 +158,10 @@ static INT find_joystick_devices(void)
|
||||||
/* Append driver name */
|
/* Append driver name */
|
||||||
strcat(joydev.name, JOYDEVDRIVER);
|
strcat(joydev.name, JOYDEVDRIVER);
|
||||||
|
|
||||||
if (device_disabled_registry(joydev.name)) continue;
|
if (device_disabled_registry(joydev.name)) {
|
||||||
|
close(fd);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef JSIOCGAXES
|
#ifdef JSIOCGAXES
|
||||||
if (ioctl(fd, JSIOCGAXES, &joydev.axis_count) < 0)
|
if (ioctl(fd, JSIOCGAXES, &joydev.axis_count) < 0)
|
||||||
|
|
Loading…
Reference in New Issue