It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said on the day of Hunayn: "Whoever kills a man, his (the slain man's) spoils are his." So on that day Sayyiduna Abu Talhah (may Allah be pleased with him) killed twenty men and took their spoils.
The wording of both chains is the same, except that in the narration of Ya'qub (may Allah have mercy on him) it is: "So on that day Sayyiduna Abu Talhah (may Allah be pleased with him) killed."
The incident of the day of Hunayn has been recorded in the Sahih from the hadith of Sayyiduna Anas (may Allah be pleased with him), but the sentence "Whoever kills a man" is not mentioned in it, nor is the story of Sayyiduna Abu Qatadah (may Allah be pleased with him) mentioned in it through the narration of Sayyiduna Anas (may Allah be pleased with him). And Allah knows best.
Imam al-Darimi (may Allah have mercy on him) narrated the mention of "Whoever kills a man, his spoils are his" from Hajjaj bin Minhal.
And Imam Abu Dawud (may Allah have mercy on him) narrated it in his Sunan through Musa bin Isma'il, from Hammad.
Imam Ahmad (may Allah have mercy on him) narrated this long hadith from Affan bin Muslim, from Hammad bin Salamah.
Imam Ibn Hibban al-Busti (may Allah have mercy on him) narrated it from al-Hasan bin Sufyan, through Hibban bin Musa, from Abdullah bin al-Mubarak, from Hammad bin Salamah.
Also, (Ibn Hibban (may Allah have mercy on him)) narrated it from Imam Abu Ya'la (may Allah have mercy on him), from Abd al-Wahid bin Ghiyath, from Hammad bin Salamah.
Related hadith on this topic