Through the same chain it is narrated: The Prophet of Allah (peace and blessings be upon him) commanded us to ransom the Muslim captives and to give to those of them who ask. Then he said: "Whoever dies leaving wealth, it belongs to his heirs; and whoever dies leaving a debt, it is my responsibility, and after me the responsibility of the rulers, from the treasury (bayt al-mal) of the Muslims."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6078