diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2002-02-04 21:44:17 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2002-02-04 21:44:17 +0000 |
commit | 230d696eaace0878d18b9d92e42e006de290c177 (patch) | |
tree | e051f1d018cda942cc76790aa564d5ce16013bd9 /sys/kern | |
parent | e00fe47e1a264dc333fbefb8f0283d86b040d56a (diff) |
Also, cleanup any external buffers first (paranoid).
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 3683ddcc73f..7bfa8b1fc3a 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.50 2002/02/04 20:50:42 jason Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.51 2002/02/04 21:44:16 angelos Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -901,15 +901,15 @@ m_zero(m) struct mbuf *m; { while (m) { + if ((m->m_flags & M_EXT) && + (m->m_ext.ext_free == NULL) && + !MCLISREFERENCED(m)) + memset(m->m_ext.ext_buf, 0, m->m_ext.ext_size); if (m->m_flags & M_PKTHDR) memset((caddr_t)m + sizeof(struct m_hdr) + sizeof(struct pkthdr), 0, MHLEN); else memset((caddr_t)m + sizeof(struct m_hdr), 0, MLEN); - if ((m->m_flags & M_EXT) && - (m->m_ext.ext_free == NULL) && - !MCLISREFERENCED(m)) - memset(m->m_ext.ext_buf, 0, m->m_ext.ext_size); m = m->m_next; } } |