4 Jan
2018
4 Jan
'18
4:50 p.m.
It's checked for all the other invocations... Coverity CID 207796 Signed-off-by: Dirk Hohndel <dirk@hohndel.org> --- src/serial_posix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/serial_posix.c b/src/serial_posix.c index 1698df8159b3..9a9373e32fb9 100644 --- a/src/serial_posix.c +++ b/src/serial_posix.c @@ -262,7 +262,11 @@ dc_serial_close (dc_iostream_t *abstract) #ifndef ENABLE_PTY // Disable exclusive access mode. - ioctl (device->fd, TIOCNXCL, NULL); + if (ioctl (device->fd, TIOCNXCL, NULL)) { + int errcode = errno; + SYSERROR (abstract->context, errcode); + dc_status_set_error(&status, syserror (errcode)); + } #endif // Close the device. -- 2.15.1