summaryrefslogtreecommitdiff
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-07-04 08:21:54 +1000
commit7df65237741b167b18ff0962a7bfc3db9d4826ed (patch)
treece59d51c8705f3543299580275e3e8c6a9c17727
parentf4e76a4c53f2abe0bd737485e0b32d6d36425118 (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> (cherry picked from commit 8251d7a8ec00b4160b6601a6f2f4f0f5d461cbee)
-rw-r--r--src/evdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index bd8d9b8..56e3b11 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