There is a good deal of controversy about the Holy Prophet's address at Khum Ghadir. But the fact is that the sayings of the Holy Prophet are a continuation of his life-long message and struggle in the light of the teachings of the Holy Quran the final Word of Allah. Whatever is compatible with it is only to be accepted.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari