Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates: A man was travelling with the Prophet (peace and blessings be upon him) and he cursed his camel, so the Prophet (peace and blessings be upon him) said: "O servant of Allah, do not travel with us on an accursed camel."
Abu Ya'la, and al-Tabarani in al-Mu'jam al-Awsat, recorded it with similar wording; the narrators of Abu Ya'la are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الأدب / 13038