Volume 7 · Book 65 · Hadith 286
Narrated Abu Musa Al-Ash'ari: The Prophet said, "Give food to the hungry, pay a visit to the sick and release (set free) the one in captivity (by paying his ransom)."
— Sahih Bukhari, Volume 7, Book 65: Food, Meals, Hadith #286