It is narrated from Jabir bin Abdullah (may Allah be pleased with them both) that the Messenger of Allah (ﷺ) said: "Whoever gives 'Umra to someone for him and his heirs, then it will belong to the one for whom 'Umra was made, and it will not return to the giver, because he has given it in such a way that the right of inheritance has been established (i.e., the right of the heirs has been established)."
Hadith Referenceمسند الإمام الشافعي / كتاب الوقف والعمرى والرقبى / 1064
Hadith Takhrijاخرجه مسلم، الهبات، باب العمري (1625)۔