Date: Wed, 4 Jan 2017 02:34:30 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311228 - head/contrib/netbsd-tests/lib/libc/gen Message-ID: <201701040234.v042YUeN034756@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Jan 4 02:34:30 2017 New Revision: 311228 URL: https://svnweb.freebsd.org/changeset/base/311228 Log: ftok_link: don't leak fd MFC after: 3 days Reported by: Coverity CID: 978291 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Wed Jan 4 02:31:05 2017 (r311227) +++ head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Wed Jan 4 02:34:30 2017 (r311228) @@ -68,6 +68,9 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701040234.v042YUeN034756>