Hasan al-Basri (may Allah have mercy on him) narrates from Sayyiduna Imran bin Husayn (may Allah be pleased with him) that a man died and left six slaves, whom he had freed at the time of his death. His heirs came and mentioned it to the Prophet (peace and blessings be upon him). He (peace and blessings be upon him) said: "Had we known, we would not have offered his funeral prayer." He (peace and blessings be upon him) said: "Call the slaves." They were called, and he (peace and blessings be upon him) drew lots between them, freed two and kept four in slavery.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العتق / 21398