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);
 
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to