It is narrated from Sayyiduna Imran bin Husayn (may Allah be pleased with him) that a man from the Ansar freed his six slaves at the time of his death, and he had no wealth other than them. This reached the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) was angered by it and said: "I had resolved not to lead his funeral prayer." Then he (peace and blessings be upon him) called his slaves, divided them into three portions, then cast lots between them, freed two and kept four in slavery.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15503