aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-05-28 09:50:15 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-06-08 09:12:14 +1000
commit8251d7a8ec00b4160b6601a6f2f4f0f5d461cbee (patch)
treeebe91bafb8a30b25daaffd8c4c8c6e97a5d90810
parentRelease mtdev data whenever we close the fd (diff)
downloadxf86-input-evdev-8251d7a8ec00b4160b6601a6f2f4f0f5d461cbee.tar.gz
xf86-input-evdev-8251d7a8ec00b4160b6601a6f2f4f0f5d461cbee.tar.bz2
xf86-input-evdev-8251d7a8ec00b4160b6601a6f2f4f0f5d461cbee.zip
Close the fd when mtdev open fails
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--src/evdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index fb44c37..a4512cb 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2355,6 +2355,7 @@ EvdevOpenDevice(InputInfoPtr pInfo)
pEvdev->cur_slot = pEvdev->mtdev->caps.slot.value;
else {
xf86Msg(X_ERROR, "%s: Couldn't open mtdev device\n", pInfo->name);
+ EvdevCloseDevice(pInfo);
return FALSE;
}
#endif