diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-11-26 22:56:08 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2008-11-26 22:56:08 +0000 |
commit | 7785a9a2a3ddfcbd59f1afbfc16ccf68fbe2a5f7 (patch) | |
tree | e2c17d9f59f4e3de5772f5550819b4ea59a0f64d /sys | |
parent | 79f8981edd6e42a094ab11a3c2aa4a69f5a0d80f (diff) |
Do a quick return if m->m_next is NULL in m_defrag() because there is nothing
todo. Discussed with deraadt@ and dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 08ed4b4f154..b0ce3d43e2f 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.104 2008/11/26 21:39:57 deraadt Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.105 2008/11/26 22:56:07 claudio Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -374,8 +374,11 @@ m_defrag(struct mbuf *m, int how) { struct mbuf *m0; + if (m->m_next == NULL) + return; + #ifdef DIAGNOSTIC - if (!(m->m_flags & M_PKTHDR) || m->m_next == NULL) + if (!(m->m_flags & M_PKTHDR)) panic("m_defrag: no packet hdr or not a chain"); #endif |