Fix potential leak in framed channels