Date: Sat, 7 Jan 2017 09:16:22 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r311610 - stable/10/contrib/netbsd-tests/lib/libc/sys Message-ID: <201701070916.v079GMk5094872@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Jan 7 09:16:22 2017 New Revision: 311610 URL: https://svnweb.freebsd.org/changeset/base/311610 Log: MFC r311272: revoke_perm: don't leak fd at the end of the test; close it This code is unused on FreeBSD, but it mutes a valid Coverity warning which would be true on NetBSD CID: 978311 Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Sat Jan 7 09:16:18 2017 (r311609) +++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c Sat Jan 7 09:16:22 2017 (r311610) @@ -176,6 +176,9 @@ ATF_TC_BODY(revoke_perm, tc) if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS) atf_tc_fail("revoke(2) did not obey permissions"); +#ifdef __FreeBSD__ + (void)close(fd); +#endif ATF_REQUIRE(unlink(path) == 0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070916.v079GMk5094872>