A female slave, whose husband is a slave, has the option to keep him or leave him (when she is manumitted). Sahih al-Bukhari 5282
Translation
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.