Fix a bug that will cause failure of free(line)