From Sahih Muslim (Hadith 3761):
Abu Huraira (Allah be pleased with him) reported that Sa'd b. 'Ubada al-Ansari said:Messenger of Allah, tell me if a man finds his wife with another person, should he kill him? Allah's Messenger (ﷺ) said: No. Sa'd said: Why not? I swear by Him Who has honored you with the Truth. There upon Allah's Messenger (ﷺ) said: Listen to what your chief says
Reference: Muslim 3761