mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 19:50:25 +01:00
evdev: reset the device fd after closing it
A caller may have a reference to the device after closing it, make sure that ref doesn't have a dangling fd so future attempts of reading from/writing to the device fail. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
128f98c43b
commit
d31b1b7b70
1 changed files with 1 additions and 0 deletions
|
|
@ -728,6 +728,7 @@ evdev_device_remove(struct evdev_device *device)
|
|||
if (device->mtdev)
|
||||
mtdev_close_delete(device->mtdev);
|
||||
close_restricted(device->base.seat->libinput, device->fd);
|
||||
device->fd = -1;
|
||||
list_remove(&device->base.link);
|
||||
|
||||
notify_removed_device(&device->base);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue