summaryrefslogtreecommitdiff
path: root/check.c
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>1996-04-02 19:57:13 +0000
committerTodd C. Miller <Todd.Miller@courtesan.com>1996-04-02 19:57:13 +0000
commit967ce4a750f71fc1fdfe9ae5993de1466e372f69 (patch)
treef5db0d89b6aa3528bcb8338651611404b53e62fe /check.c
parentead5f15a18d0b9a82f2d02feb777c6b727a3624d (diff)
downloadsudo-967ce4a750f71fc1fdfe9ae5993de1466e372f69.tar.gz
was closing an fd that may not have been opened
Diffstat (limited to 'check.c')
-rw-r--r--check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/check.c b/check.c
index 09544834c..2b2172a6c 100644
--- 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 */