Fix leak in buffer segment.