Skip to content

touchpad: fix leak when the touchpad is removed before the dwt keyboard

Peter Hutterer requested to merge whot/libinput:wip/dwt-leak into main

If a touchpad is removed before its dwt-paired keyboard, we're leaking the keyboard struct. Fix this by cleaning up properly when our device is removed.

This is the cause of many failed tests in the udev backend tests during the CI valgrind run. Because we're testing the udev backend it will add any devices created by tests run in parallel, some of which are keyboard devices. Depening on the test completions, the keyboards may or may not get removed before this device.

Fixes some parts of #622, cc @satrmb

Merge request reports