dinput: Added a missing close(fd) in disabled case (Coverity).

oldstable
Marcus Meissner 2012-09-15 20:17:11 +02:00 committed by Alexandre Julliard
parent 1104678b40
commit 1c3b1c3fec
1 changed files with 4 additions and 1 deletions

View File

@ -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)