Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:6751Ḥafṣ b. ʿUmar > Shuʿbah > al-Ḥakam > Ibrāhīm > al-Aswad > ʿĀʾishah > Āshtarayt Barīrah

I bought Barira (a female slave). The Prophet ﷺ said (to me), "Buy her as the Wala' is for the manumitted." Once she was given a sheep (in charity). The Prophet ﷺ said, "It (the sheep) is a charitable gift for her (Barira) and a gift for us." Al-Hakam said, "Barira's husband was a free man." Ibn ʿAbbas said, 'When I saw him, he was a slave."  

البخاري:٦٧٥١حَدَّثَنَا حَفْصُ بْنُ عُمَرَ حَدَّثَنَا شُعْبَةُ عَنِ الْحَكَمِ عَنْ إِبْرَاهِيمَ عَنِ الأَسْوَدِ عَنْ عَائِشَةَ قَالَتِ اشْتَرَيْتُ بَرِيرَةَ فَقَالَ

النَّبِيُّ ﷺ اشْتَرِيهَا فَإِنَّ الْوَلاَءَ لِمَنْ أَعْتَقَ وَأُهْدِيَ لَهَا شَاةٌ فَقَالَ هُوَ لَهَا صَدَقَةٌ وَلَنَا هَدِيَّةٌ قَالَ الْحَكَمُ وَكَانَ زَوْجُهَا حُرًّا وَقَوْلُ الْحَكَمِ مُرْسَلٌ وَقَالَ ابْنُ عَبَّاسٍ رَأَيْتُهُ عَبْدًا