mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
stat_symlink: don't leak fd; close the file descriptor when done
MFC after: 3 days Reported by: Coverity CID: 978314
This commit is contained in:
parent
c0b11b8e04
commit
621b0f13af
1 changed files with 3 additions and 0 deletions
|
|
@ -398,6 +398,9 @@ ATF_TC_BODY(stat_symlink, tc)
|
|||
|
||||
ATF_REQUIRE(unlink(path) == 0);
|
||||
ATF_REQUIRE(unlink(pathlink) == 0);
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC_CLEANUP(stat_symlink, tc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue