First run the KASSERT before trying to do the free operation.
Better for reporting and debugging.
Add a guard setting the value to NULL afterwards. NULL pointers
are a lot easier to test for.
Note: we should really just change the amrr local ref to atomics.
MFC after: 3 days