It is narrated from Sayyiduna Umayr (may Allah be pleased with him), the freed slave of Abi al-Lahm, that he said: My master ordered me to dry some meat to preserve it. Meanwhile a poor man came to me, and I fed him some of it. My master came to know of it and beat me. I came to the Messenger of Allah (peace and blessings be upon him) and told him about it, and he (peace and blessings be upon him) summoned my master and asked: "Why did you beat him?" He said: "He gives away food without my ordering him to." He (peace and blessings be upon him) said: "The reward is shared between you both."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14197