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

MFC after:	3 days
Reported by:	Coverity
CID:		978311
This commit is contained in:
ngie 2017-01-04 08:59:06 +00:00
parent c3092fd7a3
commit 616267f093

View File

@ -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);
}