Date: Sat, 7 Jan 2017 09:27: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-10@freebsd.org Subject: svn commit: r311620 - stable/10/contrib/netbsd-tests/lib/libc/gen Message-ID: <201701070927.v079Rg1v099428@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Jan 7 09:27:42 2017 New Revision: 311620 URL: https://svnweb.freebsd.org/changeset/base/311620 Log: MFC r311228: ftok_link: don't leak fd CID: 978291 Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ftok.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Jan 7 09:26:34 2017 (r311619) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_ftok.c Sat Jan 7 09:27:42 2017 (r311620) @@ -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.v079Rg1v099428>