CID12154 - Close tty on failure to set attribute

This commit is contained in:
Ed Gonzalez 2015-06-12 11:17:14 -05:00
parent 907e3514fa
commit a3e918ee32

View file

@ -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;
}