It is a moral duty to protect the good reputation of others

Even if the information is true, sharing it can be objectively sinful (indiscretion/detraction).

Source: CCC 2477–2479.
Telling the truth does not automatically protect one from sin.