From a3e918ee32e5ee72abe80c9e3a7ae62437f38577 Mon Sep 17 00:00:00 2001 From: Ed Gonzalez Date: Fri, 12 Jun 2015 11:17:14 -0500 Subject: [PATCH] CID12154 - Close tty on failure to set attribute --- DSP_API/ThumbDV/thumbDV.c | 1 + 1 file changed, 1 insertion(+) diff --git a/DSP_API/ThumbDV/thumbDV.c b/DSP_API/ThumbDV/thumbDV.c index 6faf84d..dc4337c 100644 --- a/DSP_API/ThumbDV/thumbDV.c +++ b/DSP_API/ThumbDV/thumbDV.c @@ -327,6 +327,7 @@ int thumbDV_openSerial(const char * tty_name) if (tcsetattr(fd, TCSANOW, &tty) != 0) { output("ThumbDV: error %d from tcsetattr\n", errno); + close(fd); return -1; }