Language:
كتاب الفرائض
85  
Laws of Inheritance (Al-Faraa'id)
(22)
Chapter: If someone is converted to Islam through somebody else
(22)
باب إِذَا أَسْلَمَ عَلَى يَدَيْهِ
Sahih al-Bukhari 6757

Narrated Ibn `Umar:

That Aisha, the mother of the Believers, intended to buy a slave girl in order to manumit her. The slave girl's master said, "We are ready to sell her to you on the condition that her Wala should be for us." Aisha mentioned that to Allah's Messenger (ﷺ) who said, "This (condition) should not prevent you from buying her, for the Wala is for the one who manumits (the slave)."

حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، عَنْ مَالِكٍ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عَائِشَةَ أُمَّ الْمُؤْمِنِينَ، أَرَادَتْ أَنْ تَشْتَرِيَ جَارِيَةً تُعْتِقُهَا فَقَالَ أَهْلُهَا نَبِيعُكِهَا عَلَى أَنَّ وَلاَءَهَا لَنَا‏.‏ فَذَكَرَتْ لِرَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ ‏ "‏ لاَ يَمْنَعُكِ ذَلِكِ، فَإِنَّمَا الْوَلاَءُ لِمَنْ أَعْتَقَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6757
In-book reference : Book 85, Hadith 34
USC-MSA web (English) reference : Vol. 8, Book 80, Hadith 749
  (deprecated numbering scheme)