Don't mix new and free()

This is undefined behavior