Barirah was given something as charity, and the Messenger of Allah ﷺ said, "It is charity for her, but a gift for us."
حدثنا يحيى عن شعبة عن قتادة
أن بريرة تصدق عليها بصدقة فقال رسول الله ﷺ هو لها صدقة ولنا هدية
Its chain of transmission is sahih. Bukhari related it in Fath al-Bari 3/255, no. 1493, in the Book of Zakat, the chapter on giving charity to the freed servants of the Prophet's ﷺ wives, Muslim in 2/1144, no. 1504, in the Book of Manumission, the chapter that the right of inheritance from a freed slave belongs to the one who freed him, Abu Dawud in 2/224, no. 1655, and Nasai in 5/107, no. 2614.