Date: Sat, 7 Jan 2017 09:42:42 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r311630 - stable/11/contrib/netbsd-tests/lib/libc/c063 Message-ID: <201701070942.v079ggNF008057@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070942.v079ggNF008057>