Date: Wed, 4 Jan 2017 08:49:07 +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: r311271 - head/contrib/netbsd-tests/lib/libc/sys Message-ID: <201701040849.v048n7mB086935@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Jan 4 08:49:07 2017 New Revision: 311271 URL: https://svnweb.freebsd.org/changeset/base/311271 Log: stat_symlink: don't leak fd; close the file descriptor when done MFC after: 3 days Reported by: Coverity CID: 978314 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_stat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Wed Jan 4 08:43:27 2017 (r311270) +++ head/contrib/netbsd-tests/lib/libc/sys/t_stat.c Wed Jan 4 08:49:07 2017 (r311271) @@ -398,6 +398,9 @@ ATF_TC_BODY(stat_symlink, tc) ATF_REQUIRE(unlink(path) == 0); ATF_REQUIRE(unlink(pathlink) == 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif } ATF_TC_CLEANUP(stat_symlink, tc)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701040849.v048n7mB086935>