projects
/
platform
/
upstream
/
libinput.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
128f98c
)
evdev: reset the device fd after closing it
author
Peter Hutterer
<peter.hutterer@who-t.net>
Fri, 21 Feb 2014 06:13:02 +0000
(16:13 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Fri, 21 Feb 2014 06:13:02 +0000
(16:13 +1000)
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>
src/evdev.c
patch
|
blob
|
history
diff --git
a/src/evdev.c
b/src/evdev.c
index beec75ed16fa162bfd8aece1238fab69dd83800a..37c366c7ffedbefb0456033197ed32bbe57a8eea 100644
(file)
--- a/
src/evdev.c
+++ b/
src/evdev.c
@@
-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);