A man sentenced to 10 years for unlawful possession of a firearm and ammunition is to be set free because his lawyer was suspended at the time of representing him.