mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 13:38:40 +02:00
test: release a few leaking udev devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d693eef563
commit
5f589c8582
2 changed files with 6 additions and 2 deletions
|
|
@ -1562,6 +1562,7 @@ litest_add_device_with_overrides(struct libinput *libinput,
|
||||||
const struct input_absinfo *abs_override,
|
const struct input_absinfo *abs_override,
|
||||||
const int *events_override)
|
const int *events_override)
|
||||||
{
|
{
|
||||||
|
struct udev_device *ud;
|
||||||
struct litest_device *d;
|
struct litest_device *d;
|
||||||
const char *path;
|
const char *path;
|
||||||
|
|
||||||
|
|
@ -1576,8 +1577,9 @@ litest_add_device_with_overrides(struct libinput *libinput,
|
||||||
|
|
||||||
d->libinput = libinput;
|
d->libinput = libinput;
|
||||||
d->libinput_device = libinput_path_add_device(d->libinput, path);
|
d->libinput_device = libinput_path_add_device(d->libinput, path);
|
||||||
d->quirks = quirks_fetch_for_device(quirks_context,
|
ud = libinput_device_get_udev_device(d->libinput_device);
|
||||||
libinput_device_get_udev_device(d->libinput_device));
|
d->quirks = quirks_fetch_for_device(quirks_context, ud);
|
||||||
|
udev_device_unref(ud);
|
||||||
|
|
||||||
litest_assert(d->libinput_device != NULL);
|
litest_assert(d->libinput_device != NULL);
|
||||||
libinput_device_ref(d->libinput_device);
|
libinput_device_ref(d->libinput_device);
|
||||||
|
|
|
||||||
|
|
@ -859,6 +859,7 @@ START_TEST(quirks_model_one)
|
||||||
quirks_unref(q);
|
quirks_unref(q);
|
||||||
quirks_context_unref(ctx);
|
quirks_context_unref(ctx);
|
||||||
cleanup_data_dir(dd);
|
cleanup_data_dir(dd);
|
||||||
|
udev_device_unref(ud);
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
|
@ -891,6 +892,7 @@ START_TEST(quirks_model_zero)
|
||||||
quirks_unref(q);
|
quirks_unref(q);
|
||||||
quirks_context_unref(ctx);
|
quirks_context_unref(ctx);
|
||||||
cleanup_data_dir(dd);
|
cleanup_data_dir(dd);
|
||||||
|
udev_device_unref(ud);
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue