From: Todd C. Miller Date: Tue, 2 Apr 1996 19:57:13 +0000 (+0000) Subject: was closing an fd that may not have been opened X-Git-Tag: SUDO_1_5_0~235 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0eb20432fe7023a7b777b4dc4345243819d7d16c;p=sudo was closing an fd that may not have been opened --- 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 */