The Messenger of Allah ﷺ entered Mecca in the year of the Conquest wearing a helmet on his head. When he removed it, a man came to him and said, "Messenger of Allah, Ibn Khatal is clinging to the curtains of the Kaabah."He said, "Kill him."
أن رسول الله ﷺ دخل مكة عام الفتح وعلى رأسه المغفر، فلما نزعه جاءه رجل، فقال له: يا رسول الله، ابن خطل متعلق بأستار الكعبة، فقال: اقتلوه.
Malik reported it in Hajj (247), from Ibn Shihab, from Anas, and he mentioned it. Bukhari reported it in Jihad and Military Expeditions (3044), and Muslim in Hajj (1357), both of them through the route of Malik, with the same wording.