From 4aa569de443979ceec1d6a33106cce1f9075795d Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 4 Sep 2016 23:03:42 +0200 Subject: [PATCH] Fix descriptor leak in getty() Found by Coverity Scan. Signed-off-by: Joachim Nilsson --- getty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/getty.c b/getty.c index a99b3ea3..6e366a1f 100644 --- a/getty.c +++ b/getty.c @@ -306,6 +306,7 @@ int getty(char *tty, char *baud, char *UNUSED(term), char *user) sigaction(SIGQUIT, &sa, NULL); stty(fd, speed); + close(fd); utmp_set_login(tty, NULL); if (!user)