physics: fixed memory allocation/freeing errors

The problem: an off-by-one. No idea how I forgot the indices go to obj+1. Whatever. I now free everything I malloc in physics so that's fine as well.