Use free to release malloc-ed str