Fixes for input related leaks

Two fixes for leaks that can be triggered for example by switching TTYs. The backends/native one is 3.36 material, the other one affects only master.

Merge request reports

Loading