Sahih Muslim Book 5, Hadith Number 2184.
Chapter : Excellence of spending and giving Sadaqa to relatives, wife, children, and parents even if they are polytheists.
Jabir reported that a person among the Ansar who was called Abu Madhkur granted posthumous freedom to his slave who was called Ya’qub. The rest of the Hadith is the same.