Terminal sessiion: double freeing channel pointer fixe