O_SEARCH tests: plug trivial fd leak

Coverity correctly reports this as a resource leak. It's an admittedly minor
one, but plug it anyways.

This has been submitted upstream as misc/54939.

CID:		978288
This commit is contained in:
Kyle Evans 2020-02-05 02:30:46 +00:00
parent 1a9fe4528b
commit 56cc8b7595
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357556

View File

@ -265,6 +265,7 @@ ATF_TC_BODY(o_search_notdir, tc)
#endif
ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1);
ATF_REQUIRE(errno == ENOTDIR);
ATF_REQUIRE(close(dfd) == 0);
}
#ifdef USE_O_SEARCH