Burayda reported,

I was sitting with the Prophet ﷺ when a woman came to him and said, "Messenger of Allah, I had given my mother a slave girl as charity, and she has now died."He replied, "Your reward is confirmed, and the inheritance has returned her to you."She said, "Messenger of Allah, she owed a month of fasting. Shall I fast on her behalf?"He answered, "Fast on her behalf."She said, "Messenger of Allah, she never performed the pilgrimage. Shall I perform it on her behalf?"He answered, "Yes, perform the pilgrimage on her behalf."

Tirmidhi 667

Sahih

حدثنا علي بن حجر حدثنا علي بن مسهر عن عبد الله بن عطاء

عن عبد الله بن بريدة عن أبيه قال

كنت جالسا عند النبي ﷺ إذ أتته امرأة فقالت يا رسول الله إني كنت تصدقت على أمي بجارية وإنها ماتت قال وجب أجرك وردها عليك الميراث قالت يا رسول الله إنها كان عليها صوم شهر أفأصوم عنها قال صومي عنها قالت يا رسول الله إنها لم تحج قط أفأحج عنها قال نعم حجي عنها

الترمذي 667صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Zakat
Chapter
Donor inheriting his charity
Numbering
Darussalam 667
Tirmidhi 667