It is narrated from Umm al-Mu'mineen Sayyidah Aisha (may Allah be pleased with her) that she stated: Three Sunnahs were established with Barirah (may Allah be pleased with her). One of them is that when she was set free, she was also given the choice regarding her husband (i.e., if she wished, she could maintain the marriage or annul it).
Hadith Referenceمسند الإمام الشافعي / كتاب الطلاق / 1262
Hadith Takhrijاخرجه البخاري ، الطلاق، باب لا يكون بيع الأمة طلاقاً (5279) ومسلم، العتق، باب بيان ان الولاء لمن أعتق (1504)۔