svn commit: r311628 - stable/10/contrib/netbsd-tests/lib/libc/gen

Ngie Cooper ngie at FreeBSD.org
Sat Jan 7 09:41:19 UTC 2017


Author: ngie
Date: Sat Jan  7 09:41:18 2017
New Revision: 311628
URL: https://svnweb.freebsd.org/changeset/base/311628

Log:
  MFC r311235:
  
  ttyname_err: close fd if it was opened successfully
  
  CID:		978292

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

Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c	Sat Jan  7 09:39:15 2017	(r311627)
+++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c	Sat Jan  7 09:41:18 2017	(r311628)
@@ -78,6 +78,9 @@ ATF_TC_BODY(ttyname_err, tc)
 
 		ATF_REQUIRE(ttyname(fd) == NULL);
 		ATF_REQUIRE(errno == ENOTTY);
+#ifdef	__FreeBSD__
+		(void)close(fd);
+#endif
 	}
 }
 


More information about the svn-src-all mailing list