fix bad-free.