Test for absence of M_NOFREE before attempting to purge the mbuf's tags.

This will leave more state intact should the assertion go off.

MFC after:	1 month
This commit is contained in:
np 2014-09-30 23:16:26 +00:00
parent e0d36a2215
commit 8780788a34

View File

@ -447,9 +447,9 @@ mb_dtor_mbuf(void *mem, int size, void *arg)
m = (struct mbuf *)mem;
flags = (unsigned long)arg;
KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
if ((m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags))
m_tag_delete_chain(m, NULL);
KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
#ifdef INVARIANTS
trash_dtor(mem, size, arg);
#endif