The Book of Bequests (Kitab Al-Wasiyya)

Muslim :: Book 13 : Hadith 4005

Abu Huraira (Allah be pleased with him) reported Allah's Messenger (may peace be upon him) as saying: When a man dies, his acts come to an end, but three, recurring charity, or knowledge (by which people) benefit, or a pious son, who prays for him (for the deceased).

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star