Hilchos Lashon Hara chapter 10, section 11

A person must be very careful not to tell others that he did business with so and so and was cheated, robbed, shamed, distressed by him and suchlike, even if one knows that the story is true (except in the case explained later in paragraph 13) even if the leniencies above apply. Because in such a case one’s intent is certainly not for beneficial reasons so that people should disparage evil doers and keep from their evil ways, or that the person might leave his evil when people disparage him. Rather, one’s intent into is to disparage him because of what he did and the more shamed he is by people the more one likes it.