I heard that according to the Imam Malik School when you sleep with a girl (A-Zina), it is forbidden to marry her because it's forbidden to (Haram). Is it forbidden to marry a girl you had sex with?
Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Shariah does not object if a man marries a woman with whom he has committed Zina, provided they both repent to Allah and that the woman has one menstruation period, or gives birth if she is pregnant. The Prophet (Sallallahu Alaihi wa Sallam) said: "No pregnant woman should be married until she delivers and no woman who is not pregnant should be married until she has one menstruation period." [Abu Dawud]
Now if the woman gives birth for what she carried following illicit sex and repents to Allah sincerely from Zina, the man who committed Zina with her can marry her, but the child she got prior to legal marriage is not traced back to him and none of them inherits from the other (the child + his father from Zina). Such a child is traced to his/her mother and inherits from her as she inherits from him.
To conclude, marrying a woman who committed Zina is unlawful unless she repents and gives birth if pregnant or has one menstruation period if not. So what was said about Malik is wrong.
Allah knows best.
You can search for fatwa through many choices