Fix a leak of cleaning a line with CR on console