Fix memory leak from empty lines