أَخْبَرَنَا
إِسْمَاعِيل بْنُ خَلِيلٍ، أَخْبَرَنَا
حَفْصٌ، حَدَّثَنَا
مُحَمَّدُ بْنُ زَيْدٍ، عَنْ
عُمَيْرٍ مَوْلَى آبِي اللَّحْمِ، قَالَ: شَهِدْتُ خَيْبَرَ وَأَنَا عَبْدٌ مَمْلُوكٌ فَأَعْطَانِي رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مِنْ خُرْثِيِّ الْمَتَاعِ، وَأَعْطَانِي سَيْفًا، فَقَالَ:
"تَقَلَّدْ بِهَذَا".
Umair, the freed slave of Abu’l-Lahm, said: When I was present at (the battle of) Khaybar, at that time I was a slave (of my master). So the Messenger of Allah, peace and blessings be upon him, gave me (some) of the household belongings and gave me a sword, and said: "Hang it (by your side)."
Brief Explanation
(Commentary on Ahadith 2509 to 2511)
From this hadith, it is understood that slaves have no share in the spoils of war (mal-e-ghanīmah).
However, as a reward, something may be given to them, just as the Messenger of Allah (sallallahu alayhi wa sallam) granted a sword to Umair. Similarly, children and women also have no share in the spoils of war; something may be given to them as a reward.
This is the position of the majority of scholars and the Ahl al-Hadith, as is explained in Abu Dawud.
And Allah knows best.