mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue