From 5dba8e8dc119241ee8d6222279c0da2ce10f9efe Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 7 Jan 2017 09:16:22 +0000 Subject: 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 --- contrib/netbsd-tests/lib/libc/sys/t_revoke.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'contrib/netbsd-tests/lib/libc') diff --git a/contrib/netbsd-tests/lib/libc/sys/t_revoke.c b/contrib/netbsd-tests/lib/libc/sys/t_revoke.c index 926d2740..8e4c2a3 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_revoke.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_revoke.c @@ -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); } -- cgit v1.1