Date: Sat, 7 Jan 2017 09:27:46 +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: r311621 - stable/11/contrib/netbsd-tests/lib/libc/gen Message-ID: <201701070927.v079RkLX099476@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Jan 7 09:27:46 2017 New Revision: 311621 URL: https://svnweb.freebsd.org/changeset/base/311621 Log: MFC r311228: ftok_link: don't leak fd CID: 978291 Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Jan 7 09:27:42 2017 (r311620) +++ stable/11/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Jan 7 09:27:46 2017 (r311621) @@ -68,6 +68,9 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070927.v079RkLX099476>