Sahih al-Bukhari 2536
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أَعْتِقِيهَا، فَإِنَّ الْوَلاَءَ لِمَنْ أَعْطَى الْوَرِقَ "
Narrated `Aisha:
I bought Buraira but her masters put the condition that her Wala' would be for them. I told the Prophet (ﷺ) about it. He said (to me), "Manumit her as her Wala' will be for the one who pays the price." So, I manumitted her. The Prophet (ﷺ) called Buraira and gave her the option of either staying with her husband or leaving him. She said, "Even if he gave me so much money, I would not stay with him," and so she preferred her freedom to her husband.
Full reference and source
Sahih al-Bukhari 2536 In-book : Book 49, Hadith 21 USC-MSA web (English) : Vol. 3, Book 46, Hadith 713 (deprecated)
View source on Sunnah.com (opens in a new tab)