]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ttymsg: fix resource leak [coverity scan]
authorKarel Zak <kzak@redhat.com>
Thu, 25 Mar 2021 11:39:23 +0000 (12:39 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 25 Mar 2021 11:39:23 +0000 (12:39 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/ttymsg.c

index b04687596ea30e469e873bd9de6ee59e9028ceac..14d6ca64708e132136497d0cad121dcc9dc67bd4 100644 (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;