"Sa'd bin 'Ubadah went out with the Prophet on one of his campaigns, and death came to his mother in Al-Madinah. It was said to her (as she was dying): 'Make a will.' She said: 'To whom shall I make a will? The wealth belongs to Sa'd.' Then she died before Sa'd came. When Sa'd came, he was told about that and he said: 'O Messenger of Allah, will it benefit her if I give in charity on her behalf?' The Prophet said: 'Yes.' Sa'd said: 'Such and such a garden is given in charity on her behalf' -regarding a garden that he named."
Sunan an-Nasa'i Book 30, Hadith 40