Abdullah bin Umar reported,

Ayesha رضي الله عنها negotiated with Barirah over her purchase. The Prophet ﷺ then went out for prayer, and when he returned she told him, "They refused to sell her unless they could stipulate that the right of inheritance (wala) would remain with them."The Prophet ﷺ said, "The wala belongs only to the one who sets the slave free."I asked Nafi, "Was her husband free or a slave?"He replied, "How would I know?"

Bukhari 2156

Sahih

حدثنا حسان بن أبي عباد حدثنا همام قال سمعت نافعا يحدث

عن عبد الله بن عمر رضي الله عنهما

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

البخاري 2156صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Sales
Chapter
Buying and selling with women
Numbering
Darussalam 2156
Bukhari 2156