Urwah bin al-Zubayr narrated that he heard Hakim bin Hizam (may Allah be pleased with him) say: I said: O Messenger of Allah! In the Days of Ignorance I freed forty slaves. The Prophet (peace and blessings be upon him) said: "You have embraced Islam along with the good deeds you did before."
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 3071