Sahih al-Bukhari 5282
Sahih al-Bukhari · Book 68: Divorce · A female slave, whose husband is a slave, has the option to keep him or leave him (when she is manumitted).
Narrated Ibn `Abbas:
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ ، حَدَّثَنَا عَبْدُ الْوَهَّابِ ، عَنْ أَيُّوبَ ، عَنْ عِكْرِمَةَ ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ كَانَ زَوْجُ بَرِيرَةَ عَبْدًا أَسْوَدَ يُقَالُ لَهُ مُغِيثٌ، عَبْدًا لِبَنِي فُلاَنٍ، كَأَنِّي أَنْظُرُ إِلَيْهِ يَطُوفُ وَرَاءَهَا فِي سِكَكِ الْمَدِينَةِ.
Barira's husband was a black slave called Mughith, the slave of Bani so-and-so-- as if I am seeing him now, walking behind her along the streets of Medina.