Author: ngie
Date: Wed Jan  4 08:59:06 2017
New Revision: 311272
URL: https://svnweb.freebsd.org/changeset/base/311272

Log:
  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
  
  MFC after:    3 days
  Reported by:  Coverity
  CID:          978311

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c   Wed Jan  4 08:49:07 
2017        (r311271)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_revoke.c   Wed Jan  4 08:59:06 
2017        (r311272)
@@ -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);
 }
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to