bug found and fixed
This commit is contained in:
parent
fbd4db8b18
commit
2f47bc1661
1 changed files with 2 additions and 0 deletions
|
|
@ -123,6 +123,7 @@ int dev_evdev_open(
|
||||||
|
|
||||||
if (libevdev_new_from_fd(fd, &out_evdev) != 0) {
|
if (libevdev_new_from_fd(fd, &out_evdev) != 0) {
|
||||||
fprintf(stderr, "Cannot initialize libevdev from this device (%s) -- Skipping.\n", path);
|
fprintf(stderr, "Cannot initialize libevdev from this device (%s) -- Skipping.\n", path);
|
||||||
|
open_fds[open_sysfs_idx] = -1;
|
||||||
close(fd);
|
close(fd);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -132,6 +133,7 @@ int dev_evdev_open(
|
||||||
// try to open the device
|
// try to open the device
|
||||||
if (!ev_matches(out_evdev, in_filters)) {
|
if (!ev_matches(out_evdev, in_filters)) {
|
||||||
libevdev_free(out_evdev);
|
libevdev_free(out_evdev);
|
||||||
|
open_fds[open_sysfs_idx] = -1;
|
||||||
close(fd);
|
close(fd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue