Narrated Abdullah ibn Umar: The Prophet ﷺ said: Make a mention of the virtues of your dead, and refrain from (mentioning) their evils.
Related hadith on this topic
Explanation & Benefits
Shaykh Umar Farooq Saeedi
Benefits and Issues:
The deceased has already departed to the next world to receive the reward or punishment for his deeds; now, mentioning his faults will only cause distress to his heirs and become a cause of mutual enmity among you.
However, if there is a Shari‘ah-based necessity to clarify someone’s disbelief, polytheism, or innovation, then it should be stated so that people remain cautious—for example, if certain individuals have been the cause of spreading corrupt beliefs or have been weak in the narration of hadith, then mentioning them is a part of the religion, not due to any personal motive.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 4900