mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
m_pulldown(): Change an if () panic() into a KASSERT().
If we pass in a NULL mbuf to m_pulldown() we are in a bad situation already. There is no point in doing that check for production code. Change the if () panic() into a KASSERT. MFC after: 3 weeks Sponsored by: Netflix
This commit is contained in:
parent
f6689bce79
commit
28d7601989
1 changed files with 2 additions and 2 deletions
|
|
@ -101,8 +101,8 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
|
|||
int writable;
|
||||
|
||||
/* check invalid arguments. */
|
||||
if (m == NULL)
|
||||
panic("m == NULL in m_pulldown()");
|
||||
KASSERT(m != NULL, ("%s: fix caller: m is NULL off %d len %d offp %p\n",
|
||||
__func__, off, len, offp));
|
||||
if (len > MCLBYTES) {
|
||||
m_freem(m);
|
||||
return NULL; /* impossible */
|
||||
|
|
|
|||
Loading…
Reference in a new issue