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:
Enji Cooper 2017-01-04 08:49:07 +00:00
parent c0b11b8e04
commit 621b0f13af

View file

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