svn commit: r311608 - stable/10/contrib/netbsd-tests/lib/libc/c063

Ngie Cooper ngie at FreeBSD.org
Sat Jan 7 09:15:20 UTC 2017


Author: ngie
Date: Sat Jan  7 09:15:19 2017
New Revision: 311608
URL: https://svnweb.freebsd.org/changeset/base/311608

Log:
  MFC r311246:
  
  fexecve: don't leak fd on fexecve(2) failure; close before calling err
  
  CID:		978285

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

Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c	Sat Jan  7 09:14:12 2017	(r311607)
+++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c	Sat Jan  7 09:15:19 2017	(r311608)
@@ -70,6 +70,9 @@ ATF_TC_BODY(fexecve, tc)
 				error = 76;
 			else
 				error = EXIT_FAILURE;
+#ifdef	__FreeBSD__
+			(void)close(fd);
+#endif
 			err(error, "fexecve");
 		}
 	}


More information about the svn-src-all mailing list