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