diff --git a/sys/net/iflib.c b/sys/net/iflib.c index bf361955ddf0..b71da1fdfc83 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -3636,7 +3636,8 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) if (__predict_false(ctx->ifc_flags & IFC_QFLUSH)) { DBG_COUNTER_INC(txq_drain_flushing); for (i = 0; i < avail; i++) { - m_free(r->items[(cidx + i) & (r->size-1)]); + if (__predict_true(r->items[(cidx + i) & (r->size-1)] != (void *)txq) + m_free(r->items[(cidx + i) & (r->size-1)]); r->items[(cidx + i) & (r->size-1)] = NULL; } return (avail);