Hafetz Haim Halachot
Halacha 139 / 215

Hilchos Lashon Hara chapter 10, section 8

If you are afraid of the wrongdoer, it is possible that you may speak about him even in front of only one or two people.