diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2005-05-07 03:58:25 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2005-05-07 03:58:25 +0000 |
| commit | 5ba518022ab3bbe683ab48dfa526ebd2b643fe29 (patch) | |
| tree | 998a649730c2598106c569a9f77f9834a6dbaec0 /sys | |
| parent | ba70bc6e158ffaee7b79ee97de555c62c2f55255 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/uipc_usrreq.c | 2 | ||||
| -rw-r--r-- | sys/netinet/tcp_subr.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index decfbe270c34f..de8d96922f550 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1105,7 +1105,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 2b759b277866b..14166ad19715b 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -947,6 +947,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); |
