I heard the Messenger of Allah ﷺ say, "Wala is inherited by whoever inherits the wealth, whether parent or child."
سمعت رسول الله ﷺ يقول: يرث الولاء من ورث المال من والد أو ولد.
Ahmad (324) narrated it from Abdullah bin Yazid, who said, Ibn Lahia narrated to us, from Amr bin Shuayb, from his father, from his grandfather, from Umar bin Khattab, and he related it. Ibn Lahia's transmission became mixed up in his later years, but Abdullah bin Yazid Muqri transmitted from him before this mixing occurred. It has been said that he did not hear directly from Amr bin Shuayb. I say this is refuted by his explicit statement of having heard from him in another narration recorded by Ahmad (147). See its documentation in the chapter "The killer does not inherit."As for what has been narrated from Amr bin Shuayb, from his father, from his grandfather, that the Messenger of Allah ﷺ said, "The wala inheritance right passes to whoever inherits the property," this is daif. Tirmidhi (2114) narrated it from Qutayba, who said, Ibn Lahia narrated to us, from Amr bin Shuayb, from his father, from his grandfather, and he related it. There is well-known discussion regarding Ibn Lahia, but Qutayba bin Saeed transmitted from him before the mixing occurred. Tirmidhi said, "This hadith's chain is not strong." This weakness likely stems from the dropping of Umar bin Khattab from the chain, as in the previous hadith.On this subject there is also what has been narrated from the daughter of Hamza, who said, "My freed slave died, leaving behind a daughter, so the Messenger of Allah ﷺ divided his property between me and his daughter, giving me half and her half." Ibn Majah (2734) and Hakim (4/66) both narrated this through Muhammad bin Abdul-Rahman bin Abu Layla, from Hakam, from Abdullah bin Shaddad, from the daughter of Hamza, and he related it.Muhammad bin Abdul-Rahman bin Abu Layla had poor memory, and this is among the things he erred in, for several others narrated it from Abdullah bin Shaddad as a mursal report. Among them is what Bayhaqi (6/241) narrated through Sufyan, from Mansur bin Hayan Asadi, from Abdullah bin Shaddad, who said, "A freed slave of the daughter of Hamza died," and he related the hadith. Ibn Shaddad was the foster brother of the daughter of Hamza. Likewise, it has been narrated from Salama bin Kuhayl and Shaybi, from Abdullah bin Shaddad. This hadith is munqati. It has also been said, from Shaybi, from Abdullah bin Shaddad, from his father, but this is not preserved.Ibrahim Nakhai said, "A freed slave of Hamza bin Abdul-Muttalib died, and the Prophet ﷺ gave the daughter of Hamza half as a gift of provision, and took the other half for himself." Abu Dawud narrated this in Al-Marasil (365). Bayhaqi said, "This is a mistake."Ahmad (27284) narrated it through Qatada, from Salma bint Hamza, that her freed slave died, leaving behind a daughter, and the Prophet ﷺ gave his daughter half in inheritance, and gave Yaala the other half in inheritance, as he was the son of Salma. This too contains a break in the chain, for Qatada did not hear from Salma bint Hamza.The sum total of these various routes indicates that the report has some basis, even though each individual route is not free from criticism. This is why Bayhaqi (10/302), after mentioning the route of Sufyan from Salama bin Kuhayl, said, "This is mursal, and it has been narrated through other routes as mursal as well, and some of them corroborate others."