backend/libinput: don't leak udev_device

This commit is contained in:
tokyo4j 2025-05-20 01:14:16 +09:00
parent 2d5492c737
commit 170f7e0706
2 changed files with 2 additions and 0 deletions

View file

@ -37,6 +37,7 @@ void init_device_tablet(struct wlr_libinput_input_device *dev) {
struct udev_device *udev = libinput_device_get_udev_device(dev->handle);
char **dst = wl_array_add(&wlr_tablet->paths, sizeof(char *));
*dst = strdup(udev_device_get_syspath(udev));
udev_device_unref(udev);
wl_list_init(&dev->tablet_tools);
}