svn commit: r311586 - stable/11/contrib/netbsd-tests/lib/libc/sys

Ngie Cooper ngie at FreeBSD.org
Sat Jan 7 08:16:53 UTC 2017


Author: ngie
Date: Sat Jan  7 08:16:52 2017
New Revision: 311586
URL: https://svnweb.freebsd.org/changeset/base/311586

Log:
  MFC r311239:
  
  umask_open: don't leak fd on success
  
  CID:		978315

Modified:
  stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c	Sat Jan  7 08:08:35 2017	(r311585)
+++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c	Sat Jan  7 08:16:52 2017	(r311586)
@@ -129,6 +129,9 @@ ATF_TC_BODY(umask_open, tc)
 		if (fd < 0)
 			continue;
 
+#ifdef	__FreeBSD__
+		(void)close(fd);
+#endif
 		(void)memset(&st, 0, sizeof(struct stat));
 
 		if (stat(path, &st) != 0) {


More information about the svn-src-stable-11 mailing list