Omar Khadr was never charged nor tried in a court of law with any crime whatsoever, let alone any crime related to terrorism. He was coerced into confessing to what his interrogators at Guantanamo wanted him to say, and a plea bargain was arranged so that he had a chance of serving his sentence in a Canadian prison. 

There is no reason Omar Khadr should serve an endless prison sentence, simply because he was captured by the USA as a child soldier; certainly not without a trial in a court of law. He has a right to that as a Canadian, and should have been tried in a court of law before he was imprisoned.