It is narrated from Hazrat Aishah (may Allah be pleased with her) that a man asked the Prophet (peace and blessings be upon him): My mother died suddenly, and I think that if she had had the chance to speak, she would have given charity. If I give charity on her behalf, will there be a reward for her? The Messenger of Allah (peace and blessings be upon him) said: "Yes." The wording of Malik is: I think that if she had had the chance to speak, she would have given charity; shall I give charity on her behalf? He (peace and blessings be upon him) said: "Yes."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12629