diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -186,10 +186,17 @@ */ if (!aio_clear_cancel_function(db->job)) ddp_complete_one(db->job, 0); +#ifdef INVARIANTS + db->job = NULL; +#endif } - if (db->ps) + if (db->ps) { free_pageset(td, db->ps); +#ifdef INVARIANTS + db->ps = NULL; +#endif + } } static void