She wanted to buy Barirah, but the sellers stipulated that the right of inheritance from the freed slave (wala) would remain with them. The Prophet ﷺ said, "The wala belongs 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 what women inherit from wala, hadith no. 6760, from the hadith of Sufyan Thawri through the same chain. Muslim narrated it, hadith no. 1504, from the hadith of Ayesha.There is also a report on this subject from Ibn Umar [Bukhari, no. 2169, and Muslim, no. 1504/5] and Abu Hurairah [Muslim, no. 1505].