Date: Mon, 21 Aug 2006 05:55:13 -0400 From: "Ighighi Ighighi" <ighighi@gmail.com> To: freebsd-bugs@freebsd.org, sheldonh@FreeBSD.org Subject: bug in truncate(1) - all FreeBSD versions Message-ID: <de5dfb5a0608210255s34ce786fo97b502caa37b6f37@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
The file in question is: /usr/src/usr.bin/truncate/truncate.c I'm working on a portable version of truncate(1) and I noticed a lot of "continue" statements in the main while() loop that skip the call to close(fd) at the end. The obvious consequence is a file descriptor leak... There's still another bug: parselength() does not need to return off_t because its return value is checked in the usual binary (0 vs -1) way. Salutes, Igh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?de5dfb5a0608210255s34ce786fo97b502caa37b6f37>