Ayesha reported,

I bought Barirah, and 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 silver."She said, "So I freed her."She said, "Then the Messenger of Allah ﷺ called her and gave her the choice regarding her husband."Barirah said, "Even if he gave me such and such, I would not stay with him." So she chose herself.He said, "And her husband was a free man."

Bukhari 6758

Sahih

حدثنا محمد أخبرنا جرير عن منصور عن إبراهيم عن الأسود

عن عائشة رضي الله عنها قالت

اشتريت بريرة فاشترط أهلها ولاءها فذكرت ذلك للنبي ﷺ فقال أعتقيها فإن الولاء لمن أعطى الورق قالت فأعتقتها قالت فدعاها رسول الله ﷺ فخيرها من زوجها فقالت لو أعطاني كذا وكذا ما بت عنده فاختارت نفسها قال وكان زوجها حرا

البخاري 6758صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Obligatory duties
Chapter
If someone accepts Islam at his hands
Numbering
Darussalam 6758
Bukhari 6758