mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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:
parent
1a9fe4528b
commit
56cc8b7595
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357556
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue