The Messenger of Allah ﷺ forbade the sale of the right of patronage and its gifting.
حدثنا علي بن محمد حدثنا وكيع حدثنا شعبة وسفيان عن عبد الله بن دينار
نهى رسول الله ﷺ عن بيع الولاء وعن هبته
Reported by Bukhari, Chapter on Emancipation, Section on selling walaa and giving it as a gift, no. 2535, and Chapter on Inheritance, Section on the sin of one who disowns his freed slaves, no. 6756, and Muslim, Chapter on Emancipation, Section on the prohibition of selling walaa and giving it as a gift, no. 1506, from the hadith of Shubah and Sufyan Thawri (and others besides them), through this same chain.