The chafetz Chaim writes in Hilchos Lashon Hara (10:2) that one of the conditions of being allowed to relate lashon hara l'toeles, (for example to save someone from getting hurt), is that the person relating it must have intention only for the purpose of the toeles and nothing else. It would seem from this that if he has other intentions he is forbidden to relate the lashon hara even for the purpose of saving someone from getting hurt.
In Hilchos Issurei Rechilus (9:2), the Chofetz Chaim also lists this condition, regarding rechilus letoeles, but in the Be'er Mayim Chaim he writes that even if one has other (non-toeles) intentions, he must still relate the rechilus. because of the mitzvah of Lo sa'amod al dam re'acha, (not standing by to save someone), but he should try as hard as possible to relate it for the positive toeles purpose.
Does this apply only to recilus? If yes why? What's the difference? If it applies to lashon hara too, why does the Chafetz chaim say it only in hilchos rechilus, and not by lashon hara??