svn commit: r311630 - stable/11/contrib/netbsd-tests/lib/libc/c063
Ngie Cooper
ngie at FreeBSD.org
Sat Jan 7 09:42:43 UTC 2017
Author: ngie
Date: Sat Jan 7 09:42:42 2017
New Revision: 311630
URL: https://svnweb.freebsd.org/changeset/base/311630
Log:
MFC r311248:
mknodat_fd: close dfd after use to avoid leaking it
CID: 978287
Modified:
stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Sat Jan 7 09:41:21 2017 (r311629)
+++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c Sat Jan 7 09:42:42 2017 (r311630)
@@ -80,6 +80,9 @@ ATF_TC_BODY(mknodat_fd, tc)
ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1);
ATF_REQUIRE(close(fd) == 0);
ATF_REQUIRE(access(FILE, F_OK) == 0);
+#ifdef __FreeBSD__
+ (void)close(dfd);
+#endif
}
ATF_TC(mknodat_fdcwd);
More information about the svn-src-stable-11
mailing list