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:
kevans 2020-02-05 02:30:46 +00:00
parent adbdb89768
commit f8ef5c1d00

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