My master commanded me to cut some meat in strips; (as I was doing it) a poor man came to me and I gave him some of it to eat. My master came to know of that, and he beat me. I came to the Messenger of Allah ﷺ and narrated it to him. He (the Holy Prophet) summoned him and said: Why did you beat him? He (Abi'l-Lahm) said: He gives away my food without being commanded to do so. Upon this he (the Holy Prophet) said: The reward would be shared by you two.
أَنْ أُقَدِّدَ لَحْمًا فَجَاءَنِي مِسْكِينٌ فَأَطْعَمْتُهُ مِنْهُ فَعَلِمَ بِذَلِكَ مَوْلاَىَ فَضَرَبَنِي فَأَتَيْتُ رَسُولَ اللَّهِ ﷺ فَذَكَرْتُ ذَلِكَ لَهُ فَدَعَاهُ فَقَالَ لِمَ ضَرَبْتَهُ فَقَالَ يُعْطِي طَعَامِي بِغَيْرِ أَنْ آمُرَهُ فَقَالَ الأَجْرُ بَيْنَكُمَا