The thief donates the stolen item after stealing it.
بَابُ السَّارِقِ تُوهَبُ مِنْهُ السَّرِقَةُ بَعْدَ مَا سَرَقَ
Sunan ad-Darimi, Book of Penalties(view book)
Sunan ad-Darimi 2345
Saʿd b. Ḥafṣ > Shaybān > Ashʿath > ʿIkrimah > Ibn ʿAbbās
Safwan bin Umayyah was sleeping in the mosque, then a man came to him while he was also sleeping. He took his cloak from under his head and woke him up. Safwan caught up with him and took it back, then he went to the Prophet Muhammad ﷺ and said, "O Messenger of Allah, I was sleeping in the mosque and this man came to me and took my cloak from under my head. I caught up with him and took it back. He ordered for it to be cut, so Safwan said to him, "O Messenger of Allah, my cloak has not reached the point where it should be cut." He said, "Why didn't you accept it before bringing it to me?" – Weak Chain
أَخْبَرَنَا سَعْدُ بْنُ حَفْصٍ حَدَّثَنَا شَيْبَانُ عَنْ أَشْعَثَ عَنْ عِكْرِمَةَ عَنْ ابْنِ عَبَّاسٍ قَالَ
كَانَ صَفْوَانُ بْنُ أُمَيَّةَ نَائِمًا فِي الْمَسْجِدِ فَأَتَاهُ رَجُلٌ وَهُوَ نَائِمٌ فَاسْتَلَّ رِدَاءَهُ مِنْ تَحْتِ رَأْسِهِ فَتَنَبَّهَ بِهِ فَلَحِقَهُ فَأَخَذَهُ فَانْطَلَقَ بِهِ إِلَى رَسُولِ اللَّهِ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ كُنْتُ نَائِمًا فِي الْمَسْجِدِ فَأَتَانِي هَذَا فَاسْتَلَّ رِدَائِي مِنْ تَحْتِ رَأْسِي فَلَحِقْتُهُ فَأَخَذْتُهُ فَأَمَرَ بِقَطْعِهِ فَقَالَ لَهُ صَفْوَانُ يَا رَسُولَ اللَّهِ إِنَّ رِدَائِي لَمْ يَبْلُغْ أَنْ يُقْطَعَ فِيهِ هَذَا قَالَ «فَهَلَّا قَبْلَ أَنْ تَأْتِيَنِي بِهِ؟» – إسناده ضعيف