svn commit: r311250 - head/contrib/netbsd-tests/lib/libc/sys

Ngie Cooper ngie at FreeBSD.org
Wed Jan 4 04:55:34 UTC 2017


Author: ngie
Date: Wed Jan  4 04:55:33 2017
New Revision: 311250
URL: https://svnweb.freebsd.org/changeset/base/311250

Log:
  mincore_resid: free buf after use
  
  MFC after:	3 days
  Reported by:	Coverity
  CID:		978304

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

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c	Wed Jan  4 04:50:03 2017	(r311249)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_mincore.c	Wed Jan  4 04:55:33 2017	(r311250)
@@ -279,6 +279,9 @@ ATF_TC_BODY(mincore_resid, tc)
 	(void)munmap(addr2, npgs * page);
 	(void)munmap(addr3, npgs * page);
 	(void)unlink(path);
+#ifdef	__FreeBSD__
+	free(buf);
+#endif
 }
 
 ATF_TC_CLEANUP(mincore_resid, tc)


More information about the svn-src-head mailing list