Sahih Muslim Book 5, Hadith Number 2237.

Chapter : Concerning the collection of Sadaqa and doing of good deeds.

‘Umair, the freed slave of Abi’l-Lahm, said: 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 (may peace be upon him) 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.