if he becomes free, the marriage is not annulled; but if he reverts to being a slave, it is annulled, because at that point the master has come to own his wife.
All of these rulings are based on rationales, some of which have merit and some of which do not; there is no textual evidence for them.
“Whoever is forbidden to have intercourse with by means of a marriage contract is also forbidden by virtue of ownership, except for a female slave who is from the People of the Book, …”
His statement, “Whoever is forbidden to have intercourse with by means of a marriage contract is also forbidden by virtue of ownership,” is a governing principle: every woman whom one is forbidden to marry is likewise forbidden to have intercourse with through ownership. Thus, one is forbidden to marry one’s wife’s sister, and likewise forbidden to have intercourse with her through ownership. For example, if a man has a free wife whose sister is a slave woman, and he purchases her slave sister, the purchase is valid; yet he may not have intercourse with her so long as her sister remains his wife, unless that wife becomes unlawful to him through divorce, annulment, or otherwise. This is because just as it is not permissible to combine two sisters in marriage, it is not permissible to combine them through ownership.
If someone asks: How can purchasing her be valid while marrying her is not?
The answer is that purchasing is not necessarily intended for sexual relations; a person may purchase a slave in order to set him free. A marriage contract, however, is intended for sexual relations. Hence, it is permissible for a man to purchase his wife’s sister, but not permissible for him to marry her. Similarly, if a person in the state of ihram purchases a slave woman, the transaction is valid, whereas if he marries a woman while in ihram, the marriage is invalid. Likewise, if someone makes another person’s emancipation contingent upon purchasing him, saying, “If I purchase this person, he is free,” this is valid: purchasing may be intended for emancipation, so when he purchases him, he becomes free. But if he says, “If I marry so-and-so, she is divorced,” and then marries her, she is not divorced.