svn commit: r311607 - stable/11/contrib/netbsd-tests/lib/libc/c063

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


Author: ngie
Date: Sat Jan  7 09:14:12 2017
New Revision: 311607
URL: https://svnweb.freebsd.org/changeset/base/311607

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

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

Modified: stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c	Sat Jan  7 09:12:51 2017	(r311606)
+++ stable/11/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c	Sat Jan  7 09:14:12 2017	(r311607)
@@ -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-stable mailing list