summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 305fccf)
raw | patch | inline | side by side (parent: 305fccf)
author | Landry Breuil <landry@rhaalovely.net> | |
Wed, 24 Jun 2015 04:48:16 +0000 (06:48 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 25 Jun 2015 20:35:58 +0000 (22:35 +0200) |
src/tcpconns.c | patch | blob | history |
diff --git a/src/tcpconns.c b/src/tcpconns.c
index f4c61d539618f960c3fd8cf1740ec2c41a67b4ba..bf07a2a28b99f69c6c135bec7a1fb55872b7161a 100644 (file)
--- a/src/tcpconns.c
+++ b/src/tcpconns.c
while (next != head)
{
/* Read the pcb pointed to by `next' into `inpcb' */
- kread ((u_long) next, &inpcb, sizeof (inpcb));
+ status = kread ((u_long) next, &inpcb, sizeof (inpcb));
+ if (status != 0)
+ return (-1);
/* Advance `next' */
next = (struct inpcb *)CIRCLEQ_NEXT (&inpcb, inp_queue);
continue;
#endif
- kread ((u_long) inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb));
+ status = kread ((u_long) inpcb.inp_ppcb, &tcpcb, sizeof (tcpcb));
+ if (status != 0)
+ return (-1);
conn_handle_ports (ntohs(inpcb.inp_lport), ntohs(inpcb.inp_fport), tcpcb.t_state);
} /* while (next != head) */