The Messenger of Allah ﷺ ruled that the right of wala belongs to the one who freed the slave.
حدثنا عبد الرزاق أخبرنا ابن جريج قال سليمان بن موسى حدثنا نافع
أن رسول الله ﷺ قضى أن الولاء لمن أعتق
Its chain of transmission is sahih, and it is an abridgment of 5929. Something similar has also already passed in abridged form, narrated by Rawh from Ibn Jurayj, with this same chain, at 4817.