"A man among the Ansar stated that his salve was to be set free after he died; he was in need, and he owed a debt. The Messenger of Allah sold him (the slave) for eight hundred Dirhams, and he gave (the money) to him and said: 'Pay off your debt and spend on your dependents.'"
Sunan an-Nasa'i Book 49, Hadith 40