ttymsg: fix resource leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-03-25 12:39:23 +01:00
parent 4397707e7a
commit 928f320f09
1 changed files with 2 additions and 0 deletions

View File

@ -184,6 +184,8 @@ ttymsg(struct iovec *iov, size_t iovcnt, char *line, int tmout) {
return errbuf;
}
close(fd);
if (forked)
_exit(EXIT_SUCCESS);
return NULL;