summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2005-05-07 00:41:36 +0000
committerColin Percival <cperciva@FreeBSD.org>2005-05-07 00:41:36 +0000
commitfe2eee8231bddaae179df741f7df389a96e7afef (patch)
tree383a2f4d8c481fbc3d90a563cd17dcd85a7a396a
parentff23585421b79c720a6127a0be7fa5382c62a72e (diff)
Notes
-rw-r--r--sys/kern/uipc_usrreq.c2
-rw-r--r--sys/netinet/tcp_subr.c2
-rw-r--r--sys/netinet/tcp_timewait.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index dd91a9672792..0f507564ac6e 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1175,7 +1175,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS)
n = i; /* in case we lost some during malloc */
error = 0;
- xu = malloc(sizeof(*xu), M_TEMP, M_WAITOK);
+ xu = malloc(sizeof(*xu), M_TEMP, M_WAITOK | M_ZERO);
for (i = 0; i < n; i++) {
unp = unp_list[i];
if (unp->unp_gencnt <= gencnt) {
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index bde7f095f26c..4e9038fd6a2f 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -941,6 +941,8 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
if (inp->inp_gencnt <= gencnt) {
struct xtcpcb xt;
caddr_t inp_ppcb;
+
+ bzero(&xt, sizeof(xt));
xt.xt_len = sizeof xt;
/* XXX should avoid extra copy */
bcopy(inp, &xt.xt_inp, sizeof *inp);
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index bde7f095f26c..4e9038fd6a2f 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -941,6 +941,8 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
if (inp->inp_gencnt <= gencnt) {
struct xtcpcb xt;
caddr_t inp_ppcb;
+
+ bzero(&xt, sizeof(xt));
xt.xt_len = sizeof xt;
/* XXX should avoid extra copy */
bcopy(inp, &xt.xt_inp, sizeof *inp);