svn commit: r311621 - stable/11/contrib/netbsd-tests/lib/libc/gen
Ngie Cooper
ngie at FreeBSD.org
Sat Jan 7 09:27:47 UTC 2017
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);
More information about the svn-src-stable
mailing list