summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2017-02-28 22:18:05 +0000
committerasomers <asomers@FreeBSD.org>2017-02-28 22:18:05 +0000
commitb1d12befab2826db3760d58bea99f8a75435ad33 (patch)
tree1ea663c8359a773262dd89003e628929bb17ffdd /usr.sbin
parent04dbcaf208034c82a756c813c81bf2ce93f4f696 (diff)
downloadFreeBSD-src-b1d12befab2826db3760d58bea99f8a75435ad33.zip
FreeBSD-src-b1d12befab2826db3760d58bea99f8a75435ad33.tar.gz
MFC r311572, r311895, r311928, r311985, r312395, r312417
r311572: Fix file descriptor leaks in cmp(1) Also, add a few test cases Reported by: Coverity CID: 271624 275338 Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9074 r311895: Fix memory leaks during "tail -r" of an irregular file * Rewrite r_buf to use standard tail queues instead of a hand-rolled circular linked list. Free dynamic allocations when done. * Remove an optimization for the case where the file is a multiple of 128KB in size and there is a scarcity of memory. * Add ATF tests for "tail -r" and its variants. Reported by: Valgrind Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9067 r311928: Fix build of usr.bin/tail with GCC Submitted by: pluknet Reported by: pluknet MFC after: 27 days X-MFC-with: 311895 Sponsored by: Spectra Logic Corp r311985: Fix uninitialized variable CIDs in route6d The variables in question are actually return arguments, but it's still good form to initialize them. Reported by: Coverity CID: 979679 979680 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r312395: Fix several Coverity CIDs in devd CID 1362055, 1362054: File descriptor leaks during shutdown CID 1362013: Potential null-termination fail with long network device names CID 1362097: Uncaught exception during memory pressure CID 1362017, 1362016: Unchecked errors, possibly resulting in weird behavior if two devd instances start at the same time. CID 1362015: Unchecked error that will probably never fail Reported by: Coverity CID: 1362055 1362054 1362013 1362097 1362017 1362016 1362015 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r312417: Fix build of devd with GCC 4.2 Reported by: olivier Pointy-hat-to: asomers MFC after: 27 days X-MFC-with: 312395 Sponsored by: Spectra Logic Corp
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/route6d/route6d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index 926d82a..9015642 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -1063,6 +1063,7 @@ sendpacket(struct sockaddr_in6 *sin6, int len)
iov[0].iov_len = len;
m.msg_iov = iov;
m.msg_iovlen = 1;
+ m.msg_flags = 0;
if (!idx) {
m.msg_control = NULL;
m.msg_controllen = 0;
@@ -1127,6 +1128,7 @@ riprecv(void)
cm = (struct cmsghdr *)cmsgbuf;
m.msg_control = (caddr_t)cm;
m.msg_controllen = sizeof(cmsgbuf);
+ m.msg_flags = 0;
if ((len = recvmsg(ripsock, &m, 0)) < 0) {
fatal("recvmsg");
/*NOTREACHED*/
OpenPOWER on IntegriCloud