Sahih Muslim Book 19, Hadith Number 4357.

Chapter : The saying of the Prophet (may peace be upon him): “We (Prophets) do not have any heirs; what we leave behind is (to be given in) charity”.

It his been narrated on the authority of Abu Huraira that the Messenger of Allah (may peace be upon him)said: “We do not have any heirs; what we leave behind is a charitable endowment.”