aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-08-04 09:16:53 +0930
committerPeter Hutterer <peter.hutterer@who-t.net>2008-08-04 09:25:27 +0930
commitef607b6cce8e1feb6632c6bc1e7f322095ce54d9 (patch)
treec949f8bf34bdef41fec64c3299db035d9f7acd53
parentPrint the device name when we get a read error (diff)
downloadxf86-input-evdev-ef607b6cce8e1feb6632c6bc1e7f322095ce54d9.tar.gz
xf86-input-evdev-ef607b6cce8e1feb6632c6bc1e7f322095ce54d9.tar.bz2
xf86-input-evdev-ef607b6cce8e1feb6632c6bc1e7f322095ce54d9.zip
Actually close the fd on DEVICE_CLOSE (bug#16948)
Fixes file descriptor leak. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit d9097df01b01afaf946fa04fca8ae8ab7108ff21)
-rw-r--r--src/evdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 45b0e5d..164346a 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -864,6 +864,7 @@ EvdevProc(DeviceIntPtr device, int what)
case DEVICE_CLOSE:
xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
+ close(pInfo->fd);
break;
}