mkfifoat_fd: close dfd after use to avoid leaking it
MFC after: 3 days Reported by: Coverity CID: 978286
This commit is contained in:
parent
5641f109c1
commit
f4cbf11049
@ -63,6 +63,9 @@ ATF_TC_BODY(mkfifoat_fd, tc)
|
||||
ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1);
|
||||
ATF_REQUIRE(close(fd) == 0);
|
||||
ATF_REQUIRE(access(FIFO, F_OK) == 0);
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(dfd);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC(mkfifoat_fdcwd);
|
||||
|
Loading…
Reference in New Issue
Block a user