backend/libinput: don't leak udev_device

(cherry picked from commit 170f7e0706)
This commit is contained in:
tokyo4j 2025-05-20 01:14:16 +09:00 committed by Simon Zeni
parent f935404e68
commit b7205866c0
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);
}