summaryrefslogtreecommitdiff
path: root/src/evdev.c
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 /src/evdev.c
parentac5173163d7d1e18d47630a397ece0f26b2568c8 (diff)
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>
Diffstat (limited to 'src/evdev.c')
-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