]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Always close this fd
authorRoy Marples <roy@marples.name>
Sun, 11 Nov 2012 19:55:25 +0000 (19:55 +0000)
committerRoy Marples <roy@marples.name>
Sun, 11 Nov 2012 19:55:25 +0000 (19:55 +0000)
bind.c

diff --git a/bind.c b/bind.c
index bf267e66f63b0edd85901feae9056e73bdf34988..14f77027a190ca40519ed2b932d0ed77ec581a8b 100644 (file)
--- a/bind.c
+++ b/bind.c
@@ -87,8 +87,7 @@ daemonise(void)
                        dup2(fd, STDIN_FILENO);
                        dup2(fd, STDOUT_FILENO);
                        dup2(fd, STDERR_FILENO);
-                       if (fd > STDERR_FILENO)
-                               close(fd);
+                       close(fd);
                }
                break;
        default: