Ayesha reported,

Three legal precedents were established in the case of Barirah. She was given the choice when she was set free, and her husband was a slave at the time. People used to give her charity, and she would in turn present some of it as a gift to the Prophet ﷺ. He would say, "It is charity for her, but a gift for us." And he said, "The right of guardianship belongs to the one who freed the slave."

Ibn Majah 2076

Sahih

حدثنا علي بن محمد حدثنا وكيع عن أسامة بن زيد عن القاسم بن محمد

عن عائشة قالت

مضى في بريرة ثلاث سنن خيرت حين أعتقت وكان زوجها مملوكا وكانوا يتصدقون عليها فتهدي إلى النبي ﷺ فيقول هو عليها صدقة وهو لنا هدية وقال الولاء لمن أعتق

ابن ماجه 2076صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Divorce
Chapter
Slave woman's choice when freed
Numbering
Darussalam 2076
Ibn Majah 2076