svn commit: r311610 - stable/10/contrib/netbsd-tests/lib/libc/sys

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


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

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/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c	Sat Jan  7 09:16:18 2017	(r311609)
+++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_revoke.c	Sat Jan  7 09:16:22 2017	(r311610)
@@ -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-10 mailing list