After he climbed out, he dropped a rope down. I'm pretty sure the implication is that he freed all the prisoners. https://www.youtube.com/watch?v=DjffIi2Pl7MAt about 3:40 in this video he chucks a huge coil of rope down the hole.