Muhammad says there is to be no punishment for murdering someone who insults him

For example, in Sunan Abu-Dawud, a canonical hadith collection:

Book 38, Number 4348:
Narrated Abdullah Ibn Abbas [a companion of Muhammad]:

A blind man had a slave-mother [a slave who bore children for him] who used to abuse the Prophet (peace_be_upon_him) and disparage him. He [the blind man] forbade her but she did not stop. He rebuked her but she did not give up her habit. One night she began to slander the Prophet (peace_be_upon_him) and abuse him. So he [the blind man] took a dagger, placed it on her belly, pressed it, and killed her. A child who came between her legs was smeared with the blood that was there. When the morning came, the Prophet (peace_be_upon_him) was informed about it.

He assembled the people and said: I adjure by Allah the man who has done this action and I adjure him by my right to him that he should stand up. Jumping over the necks of the people and trembling the man stood up.

He sat before the Prophet (peace be upon him) and said: Apostle of Allah! I am her master; she used to abuse you and disparage you. I forbade her, but she did not stop, and I rebuked her, but she did not abandon her habit. I have two sons like pearls from her, and she was my companion. Last night she began to abuse and disparage you. So I took a dagger, put it on her belly and pressed it till I killed her.

Thereupon the Prophet (peace be upon him) said: Oh be witness, no retaliation is payable for her blood.
Another canonical hadith:

Sunan Abu-Dawud, Book 39, Number 4349:
Narrated Ali ibn AbuTalib [the fourth caliph, and the son-in-law of Muhammad]:

A Jewess used to abuse the Prophet (peace_be_upon_him) and disparage him. A man strangled her till she died. The Apostle of Allah (peace be upon him) declared that no recompense was payable for her blood.