Good question. Perhaps Jarvia had him captured and locked up after she took over. Don't know why he would be a prisoner for everyone but a dwarf commoner where he is the right hand man of Jarvia.
Leske is a survivor, but he lacks incentive to strike out on his own. In the Dwarf Commoner Origin, the DC is the ones who gets them out of the Holding Cells, either by opening the cells themselves or giving Leske lockpicking tools. In the other Origins, the DC doesn't succeed and eventually just gives up. Leske holds on to life, but never tries to escape until the Warden arrives.
In the DC origin, after DC has been taken to Ostagar, Leske is alone in Dust Town. He's got no real friends, since "Berath doesn't like his grunts to get too cozy". He has no real connections of his own and he has just murdered the head of Orzammars Carta and a prominent member of the Merchants caste. So he vanishes.
Meanwhile, Jarvia takes over. After settling into Beraths place, she either tracks down Leske (he's a loose thread which could mean trouble later on and letting him live freely might be seen as a weakness) or Leske approaches her (he has no friends, can't get any work and probably wants to get back on the Cartas good side).
Leske is really good at boot licking and will pretty much lower himself down to the core of the earth if he feels it's needed. He offers his service, after all, he's been a loyal Carta memeber all his life (except for the killing Berath part...) and with some smooth talking he can be made to look like a dangerous killer, who loyally serves the new Carta leader and will kill anybody who opposes her. (And he does pretty good once he's in the position. With some more self esteem, Leske would probably be quite formidable. )
TL:DR Leske lacks the drive to escape the Holding Cells on his own, but once he's out he's able to smooth talk Jarvia into letting him live in order to serve her.