mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-06 15:20:27 +01:00
test: fix leaking libevdev fd
This was the reason for the valgrind test case failures whenever we accumulated too many tests (see9c2afae1and2a110104). The cause was simply that we ran out of fds which caused libevdev to fail the scandir() searching for the event node. That resulted in a NULL devnode and an abort in litest. Close the fd before freeing the evdev device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
57527623ee
commit
a84bf167a3
1 changed files with 1 additions and 0 deletions
|
|
@ -1252,6 +1252,7 @@ litest_delete_device(struct litest_device *d)
|
|||
libinput_path_remove_device(d->libinput_device);
|
||||
if (d->owns_context)
|
||||
libinput_unref(d->libinput);
|
||||
close(libevdev_get_fd(d->evdev));
|
||||
libevdev_free(d->evdev);
|
||||
libevdev_uinput_destroy(d->uinput);
|
||||
free(d->private);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue