The Messenger of Allah ﷺ forbade the sale of the right of patronage and its gift.
أخبرنا إسمعيل بن مسعود قال حدثنا خالد قال حدثنا عبيد الله عن عبد الله بن دينار
أن رسول الله ﷺ نهى عن بيع الولاء وعن هبته
Muslim reported it in the Book of Manumission, chapter on the prohibition of selling or gifting the right of inheritance from a freed slave (wala), hadith no. 1506, from the hadith of Ubaydullah bin Umar, in the same manner. It is also found in al-Kubra, hadith no. 6254.