More coverity fixes

This commit is contained in:
Martin Holst Swende 2014-10-30 21:49:18 +01:00
commit ca4714cd23
6 changed files with 20 additions and 7 deletions

View file

@ -73,6 +73,7 @@ serial_port uart_open(const char* pcPortName)
// Does the system allows us to place a lock on this file descriptor
if (fcntl(sp->fd, F_SETLK, &fl) == -1) {
// A conflicting lock is held by another process
free(sp);
return CLAIMED_SERIAL_PORT;
}