Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: On the day of Ta'if, the Messenger of Allah (peace and blessings be upon him) freed every one of the slaves of the polytheists who came out to him (peace and blessings be upon him).
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12027