Muwatta Imam Malik Book of Hajj, Hadith 256
Yahya related to me from Malik from Ibn Shihab from Anas ibn Malik that the Messenger of Allah ﷺ entered Makka, in the Year of Victory, wearing a helmet, and when he took it off a man came to him and said, "Messenger of Allah, Ibn Khatal is clinging to the covers of the Kaba,'' and the Messenger of Allah ﷺ said, "Kill him."
Malik commented, "The Messenger of Allah ﷺ was not in ihram at the time, and Allah knows best."
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّ رَسُولَ اللَّهِ ﷺ دَخَلَ مَكَّةَ عَامَ الْفَتْحِ وَعَلَى رَأْسِهِ الْمِغْفَرُ فَلَمَّا نَزَعَهُ جَاءَهُ رَجُلٌ فَقَالَ لَهُ يَا رَسُولَ اللَّهِ ابْنُ خَطَلٍ مُتَعَلِّقٌ بِأَسْتَارِ الْكَعْبَةِ . فَقَالَ رَسُولُ اللَّهِ ﷺ " اقْتُلُوهُ " .