must free discarded line to avoid memory leaks