Firstly, imprisonment and jail time are two diff things. You put someone in jail when you charge him with something, and then you imprison him when the charges are proven in the court of law.
Zardari spent about 12 years in jail between 2 NS terms in govt and Mushrraf. Now, life imprisonment in Pakistan is 14 years. So, 12 years is pretty long time to keep someone in jail waiting for trial & when nothing was proved against him he was let go....and of course Mushrraf gave him gift of NRO...