When I was a child my mother taught me, if you can’t say something nice about someone, don’t say anything at all. It was good advice that kept me from hurting other people.
A similar principle is to never tell your friend negative things that were said about them. When you do, you unwittingly become the attacker. It is best to leave unkindness in the garbage where it belongs than smear it over someone you know.
There may be times when an unwise person repeats to you negative remarks by another individual. If that should happen, remember the proverb from Ecclesiastes, “Do not take to heart everything people say, Lest you hear your servant cursing you. For many times, also, your own heart has known that even you have cursed others” (7:21-22).