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:
parent
621b0f13af
commit
fcc9604d43
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311272
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user