Author: ngie
Date: Sat Jan  7 09:42:51 2017
New Revision: 311631
URL: https://svnweb.freebsd.org/changeset/base/311631

Log:
  MFC r311248:
  
  mknodat_fd: close dfd after use to avoid leaking it
  
  CID:          978287

Modified:
  stable/10/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c    Sat Jan  7 
09:42:42 2017        (r311630)
+++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c    Sat Jan  7 
09:42:51 2017        (r311631)
@@ -80,6 +80,9 @@ ATF_TC_BODY(mknodat_fd, tc)
        ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1);
        ATF_REQUIRE(close(fd) == 0);
        ATF_REQUIRE(access(FILE, F_OK) == 0);
+#ifdef __FreeBSD__
+       (void)close(dfd);
+#endif
 }
 
 ATF_TC(mknodat_fdcwd);
_______________________________________________
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