summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2017-01-07 09:44:02 +0000
committerngie <ngie@FreeBSD.org>2017-01-07 09:44:02 +0000
commitb864d4a784a091ca07d61df9514d6325b7a5f5c4 (patch)
tree96bc476e61f500b5f6ece0bdd2755ef94273cb1c /contrib/netbsd-tests/lib
parent883635c366be2f3943d2aff580f54bfae53ce5da (diff)
downloadFreeBSD-src-b864d4a784a091ca07d61df9514d6325b7a5f5c4.zip
FreeBSD-src-b864d4a784a091ca07d61df9514d6325b7a5f5c4.tar.gz
MFC r311247:
mkfifoat_fd: close dfd after use to avoid leaking it CID: 978286
Diffstat (limited to 'contrib/netbsd-tests/lib')
-rw-r--r--contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c b/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
index 1ae023c..3736dfa 100644
--- a/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
+++ b/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
@@ -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);
OpenPOWER on IntegriCloud