The Messenger of Allah ﷺ forbade the sale of the right of patronage and its gift.
أخبرنا قتيبة بن سعيد قال حدثنا مالك عن عبد الله بن دينار
أن رسول الله ﷺ نهى عن بيع الولاء وعن هبته
[Its isnad is sahih] It is in Muwatta (Yahya): 2/782, and Kubra, no. 6254, and it is mutafaqun alayh from the hadith of Abdullah bin Dinar with this wording. See the previous and the next.