A man came to the Prophet ﷺ and said, "My mother passed away suddenly without leaving any will, and I think that had she been able to speak, she would have given in charity. Will she receive a reward if I give in charity on her behalf, and will I receive a reward as well?"He replied, "Yes."
حدثنا إسحق بن منصور حدثنا أبو أسامة عن هشام بن عروة عن أبيه
أن رجلا أتى النبي ﷺ فقال إن أمي افتلتت نفسها ولم توص وإني أظنها لو تكلمت لتصدقت فلها أجر إن تصدقت عنها ولي أجر قال نعم
Reported by Muslim, in the Chapter on Bequests, the aforementioned chapter, hadith no. 1004 after hadith no. 1630, and in the Chapter on Zakat, the chapter on the reward of charity given on behalf of the deceased reaching him, hadith no. 1004, from the hadith of Abu Usama, with this wording.