I bought Barirah, but her owners stipulated that the right of guardianship would remain with them. I mentioned this to the Prophet ﷺ, and he said, "Free her, for the right of guardianship belongs to the one who pays the price."She said, "So I freed her. Then the Messenger of Allah ﷺ called her and gave her the choice regarding her husband."She said, "Even if he gave me such and such, I would not stay with him." So she chose herself, and her husband was a free man.
أخبرنا قتيبة قال حدثنا جرير عن منصور عن إبراهيم عن الأسود
اشتريت بريرة فاشترط أهلها ولاءها فذكرت ذلك للنبي ﷺ فقال أعتقيها فإنما الولاء لمن أعطى الورق قالت فأعتقتها فدعاها رسول الله ﷺ فخيرها من زوجها قالت لو أعطاني كذا وكذا ما أقمت عنده فاختارت نفسها وكان زوجها حرا
Bukhari narrated it in the book of manumission, chapter on selling and gifting the right of patronage, hadith no. 2536, from the hadith of Jareer bin... etc, hadith no. 1075, from the hadith of Ibrahim and Abdul-Hameed. Muslim narrated it in the book of zakat, chapter on the permissibility of gifts to the Prophet ﷺ, from Nakhai, through him. It is also found in Kubra, hadith no. 5642. His statement, "her husband was free," is from the saying of Aswad, and it is an anomalous narration.