Narrated 'Umair, the freed slave of Abil-Lahm:
I participated at Khaibar with my masters. They spoke about me to the Messenger of Allah (ﷺ) and told him that I was a slave. He said: So he ordered me to take up the sword, and I found myself dragging it, so he ordered that I be given something from the goods. I presented a Ruqyah that I used to treat the possessed with, so he ordered me leave some of it and keep some of it.
There is something on this topic from Ibn 'Abbas.
This Hadith is Hasan Sahih. This is acted upon according to the some of the people of knowledge. A complete portion is not given to slave, but something is conferred upon him. This is the view of Ath-Thawri, Ash-Shafi'i, Ahmad, and Ishaq.