Fix double frees.