Delete the pointer of `tail`

We only need to check '\0' for tail.