Hafetz Haim Halachot
Halacha 91 / 215

Hilchos Lashon Hara chapter 6, section 4

Sometimes it is even a mitzvah to listen when someone says bad things about another person. For example, if he knows that by hearing the story he will be able to show the speaker, or the other listeners, that what happened was not as it sounds, or he can judge the person favorably.

There is another case where it is a mitzvah to listen. Someone comes to complain about another person, and he knows the speaker well. He knows that if he listens, he can calm the speaker's anger at the person, and then the speaker will not spread the story to more people. In that case it is allowed to listen.

In every case where we allowed listening, he must be very careful not to believe the story. He may only treat it as a warning, so that he does not, Heaven forbid, fall into the sin of accepting lashon hara.