]> granicus.if.org Git - sudo/commitdiff
was closing an fd that may not have been opened
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 Apr 1996 19:57:13 +0000 (19:57 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 Apr 1996 19:57:13 +0000 (19:57 +0000)
check.c

diff --git a/check.c b/check.c
index 09544834c9885cd4d5575c6fe0e1ec7004694881..2b2172a6c603faa80f2182146fa1148084864a5f 100644 (file)
--- a/check.c
+++ b/check.c
@@ -343,7 +343,8 @@ static void update_timestamp()
 
            if (fd < 0)
                perror("update_timestamp: open");
-           close(fd);
+           else
+               close(fd);
        }
 
        /* relinquish root */