From 230d696eaace0878d18b9d92e42e006de290c177 Mon Sep 17 00:00:00 2001 From: "Angelos D. Keromytis" Date: Mon, 4 Feb 2002 21:44:17 +0000 Subject: Also, cleanup any external buffers first (paranoid). --- sys/kern/uipc_mbuf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/kern') 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; } } -- cgit v1.2.3