Sayyiduna Rafi' bin Khadij (may Allah be pleased with him) said: We were with the Messenger of Allah (peace and blessings be upon him) at Dhu al-Hulayfah. The people became very hungry, and we got some camels and sheep. At that time the Messenger of Allah (peace and blessings be upon him) was at the rear of the army. The people hastened, slaughtered the animals and set the cooking pots on the fire. When the Messenger of Allah (peace and blessings be upon him) arrived, he gave an order concerning them and the pots were overturned. Then he divided them, counting ten sheep as equal to one camel.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18009
It is narrated from a man of the Ansar (may Allah be pleased with him) that he said: We set out on a journey with the Messenger of Allah (peace and blessings be upon him). Because of continuous hardship the people were in severe need of food. They got some sheep as spoils, and those people took some of them, and at that time the cooking pots were boiling. When the Messenger of Allah (peace and blessings be upon him) came, he (peace and blessings be upon him) was riding his horse, and he was overturning the pots with his bow and mixing dust into the meat. Then he (peace and blessings be upon him) said: "Plundered property is not more lawful than carrion," or he said: "Carrion is not more lawful than plundered property." That is, both are unlawful.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18010