She wanted to buy Barirah, but the sellers stipulated that they retain the right of guardianship (wala). The Prophet ﷺ said, "Buy her, for the right of guardianship belongs only to the one who pays the price, or to the one who bestows the favor of emancipation."
حدثنا محمد بن بشار حدثنا عبد الرحمن بن مهدي حدثنا سفيان عن منصور عن إبراهيم عن الأسود
أنها أرادت أن تشتري بريرة فاشترطوا الولاء فقال النبي ﷺ اشتريها فإنما الولاء لمن أعطى الثمن أو لمن ولي النعمة
Bukhari also narrated it in the Book of Inheritance, chapter on walaa belonging to the one who frees a slave and the inheritance of a foundling, hadith 6751, through Ibrahim Nakhai with this wording. There is another route for it in Muslim, hadith 1504, from Ayesha with this wording.There is also a narration on this subject from Ibn Umar [Bukhari, hadith 6752].As for the statement of Yahya bin Saeed Qattan, "When I narrate from Mansur..." and so on, its chain is sahih, and likewise the statement of Ibn Mahdi about him is sahih.