util: fix a memleak for the dwtp string

Was assigned to dwt and any device with both dwt and dwtp would leak
that string.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1227>
This commit is contained in:
Peter Hutterer 2025-06-18 12:16:46 +10:00
parent 471912aacf
commit 7516dddeb3

View file

@ -210,8 +210,8 @@ print_device_options(struct libinput_device *dev)
}
if (libinput_device_config_dwtp_is_available(dev)) {
dwt = strdup_printf(" dwtp-%s",
onoff(libinput_device_config_dwtp_get_enabled(dev) == LIBINPUT_CONFIG_DWTP_ENABLED));
dwtp = strdup_printf(" dwtp-%s",
onoff(libinput_device_config_dwtp_get_enabled(dev) == LIBINPUT_CONFIG_DWTP_ENABLED));
}
if (libinput_device_has_capability(dev,