Ayesha reported,

I bought Barirah, but her owners stipulated that the right of guardianship would remain with them. I mentioned this to the Prophet ﷺ, who said, "Free her, for the right of guardianship belongs to the one who pays the silver."So I freed her, and the Prophet ﷺ 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.

Bukhari 2536

Sahih

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

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

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

البخاري 2536صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Emancipation of slaves
Chapter
Selling and giving wala as a gift
Numbering
Darussalam 2536
Bukhari 2536