The Messenger of Allah ﷺ entered Mecca in the year of the Conquest with a helmet on his head. When he removed it, a man came to him and said, "Ibn Khatal is clinging to the covers of the Kaabah."He said, "Kill him."
حدثنا القعنبي عن مالك عن ابن شهاب
أن رسول الله ﷺ دخل مكة عام الفتح وعلى رأسه المغفر فلما نزعه جاءه رجل فقال ابن خطل متعلق بأستار الكعبة فقال اقتلوه
Muslim, Hajj, chapter on the permissibility of entering Makkah without ihram, hadith no. 1357, from Qanabi, and Bukhari, jihad and expeditions, chapter on killing a captive and execution, hadith no. 3044, from the hadith of Malik through this same chain, and it is found in Muwatta (Yahya): 1/423.