Sahih Bukhari Volume 007, Book 065, Hadith Number 286.

Narrated By 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)."