Is punishment for sins forgiven by baptism? (Catholic perspective) After reading this question there is a notion that after the baptism of an adult person all sins are forgiven even all the punishments.

In the sacrament of penance, our sins are also forgiven but not our punishment. We still need to do reparation for our sins. http://www.vatican.va/archive/ccc_css/archive/catechism/p2s2c2a4.htm

Are the people who were baptized still required to do penance for their sins they committed before baptism? Does the baptism remove the punishment for sin too? Like indulgences remove all or partial punishment. Does the baptism remove all punishments and allow a person enter heaven directly if dies right away?

There is a story of a bad mafia guy who converts on deathbed and gets baptized. I heard that is believed he went directly to heaven which means all punishments were forgiven through the baptism. Is this the catholic teaching?
Yes, baptism removes all punishment for sin.  If a person died immediately after baptism they would enter heaven directly without a need for purification in purgatory.  They would not be required to do penance.  From the Catechism of the Catholic Church:


  1263 By Baptism all sins are forgiven, original sin and all personal sins, as well as all punishment for sin. In those who have been reborn nothing remains that would impede their entry into the Kingdom of God, neither Adam's sin, nor personal sin, nor the consequences of sin, the gravest of which is separation from God.