Imaam Ibn Qayyim al-Jawziyyah (RH) said:
The difference between advice and backbiting is that the intent in giving advice is to warn a Muslim against an innovator, a tempter, a cheat or a corrupt person.
Also, the Prophet (SAW) said to someone who was travelling with an acquaintance of his:
Recorded by Abu Daawood (4853): The isnaad of this hadeeth is weak due to tadlees of Ibn Ishaaq and the condition of Abdullaah bin ‘Amr bin al-Faghwaa’ Khuzaa’ee is unknown.
Source: Ar-Rooh by Ibn Qayyim al-Jawziyyah (RH).