Muwatta Malik, Book 56, Hadith 1817 (In-Book)

Malik related to me from Yahya ibn Said that Isa ibn Maryam encountered a pig on the road. He said to it, "Go in peace." Somebody asked, "Do you say this to a pig?" Isa said, "I fear lest I accustom my tongue to evil speech."

وَحَدَّثَنِي مَالِكٌ، عَنْ يَحْيَى بْنِ سَعِيدٍ، أَنَّ عِيسَى ابْنَ مَرْيَمَ، لَقِيَ خِنْزِيرًا بِالطَّرِيقِ فَقَالَ لَهُ انْفُذْ بِسَلاَمٍ ‏.‏ فَقِيلَ لَهُ تَقُولُ هَذَا لِخِنْزِيرٍ فَقَالَ عِيسَى إِنِّي أَخَافُ أَنْ أُعَوِّدَ لِسَانِي النُّطْقَ بِالسُّوءِ ‏.‏

sunnah.com

also referenced under: Book 56, Hadith 4 (USC-MSA)