One case out of many that may be considered to'eles in the case of a wrongdoing bein adam l'chaveiro:
G. To Warn Others
Warning one's children or students  to stay away from a person or group with destructive character traits, so that they will not learn from them  is permissible and even commendable.  The issur of loshon hora is based on malicious intent of the speaker. In this case, since the purpose of relating the negative information is not to hurt the subject but rather for the to'eles of saving others from potential spiritual harm, it is permissible.  It is imperative that one explain to the listeners the reason for his disparaging remarks, lest they suspect him of loshon hora, and also so that he not cause them to speak loshon hora in other, non-justifiable situations. The seven conditions for permitting loshon hora are not required here, except for the main factor of having the right intentions and not speaking out of dislike or malice towards the subject. .
563. The safer Ali Be'er notes that even though the Chofetz Chaim initially writes (LH IV, 10): "to warn his son or his students," later on in the same paragraph he continues, "... if his intention is to protect his friend so that he not learn from [the subject's] wayward behavior..." It would seem that this heter applies not only to children or students, but to anyone whom the speaker wants to inform, if it is for to'eles purposes with pure intentions (Dirshu pg. 285).
564. If there is no chance that the student or child will personally connect to or be influenced by the sinner in any way, yet the parent wants to impress upon him the severity of the negative act and denigrate the aveirah in order that he not learn from it, it is unclear if this is sufficient to'eles to mention the perpetrator by name (see Ali Be'er-Dirshu pg. 287).
565. In the words of the Chofetz Chaim: u'mitzvah nami ika - "it is also a mitzvah [to do so]" (LH IV, 10).
566. The speaker -- and certainly the listeners -- may not consider the subject a rasha due to his bad traits. he may have done teshuvah (see Sec. 6:I), or he may not understand the severity of bad middos (see Sec. 3:II.2). The listeners should be choshesh (take precautions) and protect themselves from the possible negative influence (see Sec. 7:II), as with any case of hearing loshon hora (LH IV, 41).
567. LH IV, 10, 43
Source: The Laws of Loshon Hora and Rechilus, bit.ly/loshonhorabook page 185-186