summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2017-01-07 09:16:18 +0000
committerngie <ngie@FreeBSD.org>2017-01-07 09:16:18 +0000
commit35c33432fc83877a787631a33a12b88f8fb30f8d (patch)
treebb88523937de0656fbeeb23e69ea1797498ee068 /contrib/netbsd-tests/lib/libc
parent0fdcf2529f6d1050510099835d540e28c3de138f (diff)
downloadFreeBSD-src-35c33432fc83877a787631a33a12b88f8fb30f8d.zip
FreeBSD-src-35c33432fc83877a787631a33a12b88f8fb30f8d.tar.gz
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
Diffstat (limited to 'contrib/netbsd-tests/lib/libc')
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_revoke.c3
1 files changed, 3 insertions, 0 deletions
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);
}
OpenPOWER on IntegriCloud