Who does Andy Dufresne befriend during his time at the prison ?
Upon hearing Tommy 's story , Andy realizes that if this evidence could be brought before a court , he could be given a new trial and a chance at freedom .