Skip to content
Snippets Groups Projects
Commit d31b1b7b authored by Peter Hutterer's avatar Peter Hutterer
Browse files

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: default avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 128f98c4
No related branches found
No related tags found
Loading
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment