M0101Use after free
Reported by the compiler as an error or warning.
mettle explain M0101
A heap pointer is dereferenced after free(p) on the same path. The memory may already be reused; reads are garbage and writes corrupt other data.
Fix: free last, or set the pointer aside until every use is done. This analysis is conservative: it only warns when the freed pointer and the use are provably the same allocation on the same path.