From 0ae1ad35ac158ca3a89de99c25dff38575ea1ae5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Mon, 23 Jul 2012 10:58:13 +0200 Subject: [PATCH] jogshuttle.cpp: close() on error path [Coverity 7/14] by Mikko Rapeli --- src/jogshuttle.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jogshuttle.cpp b/src/jogshuttle.cpp index b5dd0e8c..8446076e 100644 --- a/src/jogshuttle.cpp +++ b/src/jogshuttle.cpp @@ -95,6 +95,7 @@ void ShuttleThread::run() if (ioctl(fd, EVIOCGRAB, 1) < 0) { fprintf(stderr, "Can't get exclusive access on Jog Shuttle FILE DESCRIPTOR\n"); + close(fd); return;; } -- 2.39.2