I heard the Messenger of Allah ﷺ say: ʿThe loyalty (walaʿ) of a freed slave (to his former master) is passed on to the one who inherits his wealth, father or son.”
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ يَرِثُ الْوَلَاءَ مَنْ وَرِثَ الْمَالَ مِنْ وَالِدٍ أَوْ وَلَدٍ