It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) regarding the verse "And let those fear who, if they left behind weak offspring, would fear for them" [Surah al-Nisa: 9]: that is, when death approaches a man and he is told: Give charity from your wealth, free slaves, and give from it in the path of Allah. So they were forbidden from ordering him to do such things; that is, whoever of you comes to a sick person at the time of death should not order him to spend his wealth on freeing slaves, on charity and in the path of Allah. Rather, he should order him to make clear what debts he owes and what is owed to him, and to bequeath from his wealth to those relatives who do not inherit, bequeathing a fifth or a quarter to them. And he says: "Would any of you like it, when he dies leaving young children, to leave them without wealth so that they become dependent on people?" It is not right that you order him with what you would not be pleased with for yourselves and your own children; so speak what is right.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12581