From: Scott James Remnant Date: Fri, 4 Dec 2009 16:02:31 +0000 (-0500) Subject: [main] Fix fd leak X-Git-Tag: 0.8.0~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7899b6092a482a42fe828cbaf752c4b06cf1b02c;p=thirdparty%2Fplymouth.git [main] Fix fd leak When redirecting stdio to the tty, the tty was opened and its fd was dup()'d to the standard ones, but then wasn't closed. --- diff --git a/src/main.c b/src/main.c index 95dc9fe3..36f29481 100644 --- a/src/main.c +++ b/src/main.c @@ -1403,6 +1403,8 @@ redirect_standard_io_to_device (const char *device) dup2 (fd, STDOUT_FILENO); dup2 (fd, STDERR_FILENO); + close (fd); + return true; }