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

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


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

Log:
  MFC r311272:
  
  revoke_perm: don't leak fd at the end of the test; close it
  
  This code is unused on FreeBSD, but it mutes a valid Coverity warning
  which would be true on NetBSD
  
  CID:		978311

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

Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
==============================================================================
--- stable/11/contrib/netbsd-tests/lib/libc/sys/t_revoke.c	Sat Jan  7 09:15:19 2017	(r311608)
+++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_revoke.c	Sat Jan  7 09:16:18 2017	(r311609)
@@ -176,6 +176,9 @@ ATF_TC_BODY(revoke_perm, tc)
 	if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS)
 		atf_tc_fail("revoke(2) did not obey permissions");
 
+#ifdef	__FreeBSD__
+	(void)close(fd);
+#endif
 	ATF_REQUIRE(unlink(path) == 0);
 }
 


More information about the svn-src-stable mailing list