Al-Aswad narrates from Sayyidah Aishah (may Allah be pleased with her) that she intended to buy Barirah (may Allah be pleased with her) and set her free, but her owners stipulated the wala' for themselves. Sayyidah Aishah (may Allah be pleased with her) mentioned this to the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) said: "Buy her and set her free; the wala' belongs to the one who sets free." And he gave her the choice regarding her husband, and her husband was free. Meat was brought to the Prophet (peace and blessings be upon him), and it was said: This was given in charity to Barirah (may Allah be pleased with her). He (peace and blessings be upon him) said: "For her it is charity, and for us it is a gift."
Abu Dawud al-Tayalisi and some of the narrators from Shu'bah inserted it like this into the hadith; some of them made it the words of Ibrahim, and some the words of al-Hakam.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 14278