From 16fd05844bbb7394ac778ed5a036553d6536c18b Mon Sep 17 00:00:00 2001 From: cperciva Date: Mon, 4 Aug 2008 06:48:54 +0000 Subject: [PATCH] Don't close file descriptor number . Found by: LLVM/Clang Static Checker MFC after: 1 week --- usr.bin/truncate/truncate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/truncate/truncate.c b/usr.bin/truncate/truncate.c index 98f72898c048..ed5b6bfc24ee 100644 --- a/usr.bin/truncate/truncate.c +++ b/usr.bin/truncate/truncate.c @@ -57,6 +57,7 @@ main(int argc, char **argv) int ch, error, fd, oflags; char *fname, *rname; + fd = -1; rsize = tsize = 0; error = 0; rname = NULL;