Saad bin Ubada reported,

Saad bin Ubada went out with the Prophet ﷺ on one of his military expeditions, and his mother was on the verge of death in Medina. She was told, "Make a will."She replied, "What should I bequeath? The wealth belongs to Saad."She passed away before Saad returned. When Saad came back, he was informed of this and asked, "Messenger of Allah, will it benefit her if I give charity on her behalf?"The Prophet ﷺ answered, "Yes."So Saad said, "Such-and-such garden is a charity on her behalf," naming a particular garden.

Nasai 3680

Sahih

أنبأنا الحارث بن مسكين قراءة عليه وأنا أسمع عن ابن القاسم عن مالك

عن سعيد بن عمرو بن شرحبيل بن سعيد بن سعد بن عبادة عن أبيه عن جده قال

خرج سعد بن عبادة مع النبي ﷺ في بعض مغازيه وحضرت أمه الوفاة بالمدينة فقيل لها أوصي فقالت فيم أوصي المال مال سعد فتوفيت قبل أن يقدم سعد فلما قدم سعد ذكر ذلك له فقال يا رسول الله هل ينفعها أن أتصدق عنها فقال النبي ﷺ نعم فقال سعد حائط كذا وكذا صدقة عنها لحائط سماه

النسائي 3680صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Bequests
Chapter
If someone dies suddenly, is it recommended for their family to give charity on their behalf
Numbering
Darussalam 3680
Nasai 3680