Mishkat al-Masabih 1953
‘Umair the client of Abul Lahm said:
My patron ordered me to cut some meat in strips and spread it in the sun to dry, and when a poor man came to me I gave him some of it to eat. My patron got to know of that and beat me, so I went to God’s messenger and mentioned the matter to him. He summoned him and asked, “Why did you beat him?” He replied, “He gives away my food without instruction from me.” Then he said, “The reward is shared between you.” 
In a version he said: I was a slave and I asked God’s messenger whether I could give any sadaqa from my patron’s property. He replied, “Yes, and the reward will be shared equally between you.” 

Muslim transmitted it.
عَنْ عُمَيْرٍ مَوْلَى آبِي اللَّحْمِ قَالَ: أَمَرَنِي مَوْلَايَ أَنْ أُقَدِّدَ لَحْمًا فَجَاءَنِي مِسْكِينٌ فَأَطْعَمْتُهُ مِنْهُ فَعَلِمَ بِذَلِكَ مَوْلَايَ فَضَرَبَنِي فَأَتَيْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَذَكَرْتُ ذَلِكَ لَهُ فَدَعَاهُ فَقَالَ: «لِمَ ضَرَبْتَهُ؟» فَقَالَ يُعْطِي طَعَامِي بِغَيْرِ أَنْ آمُرَهُ فَقَالَ: «الْأَجْرُ بَيْنَكُمَا» . وَفِي رِوَايَةٍ قَالَ: كُنْتُ مَمْلُوكًا فَسَأَلْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: أأتصدق مِنْ مَالِ مَوَالِيَّ بِشَيْءٍ؟ قَالَ: «نَعَمْ وَالْأَجْرُ بَيْنَكُمَا نِصْفَانِ» . رَوَاهُ مُسْلِمٌ