Malik related to me that he had heard that Said ibn al-Musayyab was asked who had the wala' of the children whom a slave had by a free woman. Said said, "If their father dies and he is a slave who was not set free, their wala' belongs to the mawali of their mother." Malik said, "That is like the child of a woman who is a mawla who has been divorced by lian; the child is attached to the mawali of his mother and they are his mawali. If he dies, they inherit from him. If he commits a crime, they pay the blood-money for him. If his father acknowledges him, he is given a kinship to him and his wala' goes to the mawali of his father. They are his heirs, they pay his blood-money and his father is punished with the hadd-punishment." Malik said, "It is like that with a free-born woman divorced by lian. If her husband who curses her by lian does not acknowledge her child, the child is dealt with in the same way except that the rest of his inheritance after the inheritance of his mother and his brothers from his mother goes to all the muslims as long as he was not given kinship to his father. The child of the lian is attached to the patronage of the mawali of his mother until his father acknowledges him because he does not have a lineage or paternal relations. If his lineage is confirmed, it goes to his paternal relations." Malik said, "The generally agreed-on way of doing things among us about a child of a slave by a free woman, while the father of the slave is free, is that the grandfather (the father of the slave), attracts the wala' of his son's free children by a free woman. They leave their inheritance to him as long as their father is a slave. If the father becomes free, the wala' returns to his mawali. If he dies and he is still a slave, the inheritance and the wala' go to the grandfather. If the slave has two free sons, and one of them dies while the father is still a slave, the grandfather, the father of the father, attracts the wala' and the inheritance." Malik spoke about a slave-girl who was set free while she was pregnant and her husband was a slave and then her husband became free before she gave birth, or after she gave birth. He said, "The wala' of what is in her womb goes to the person who set the mother free because slavery touched the child before the mother was set free. It is not treated in the same way as a child conceived by its mother after she has been set free because the wala' of such a child, is attracted by the father when he is set free." Malik said that if a slave asked his master's permission to free a slave of his and his master gave permission, the wala' of the freed slave went to the master of his master, and his wala' did not return to the master who had set him free, even if he were to become free himself."
USC-MSA web (English) reference: Book 38, Hadith 21
Arabic reference: Book 38, Hadith 1487