Sunan Ibn Majah, Book 13, Hadith 53 (Ibn Majah 2360)

It was narrated that Ibn Khaldah, who was a judge in Al-Madinah, said:

We came to Abu Hurairah and asked him about a companion of ours who had become bankrupt. He said: “This is what the Prophet (ﷺ) ruled: 'Any man who dies or becomes bankrupt, the owner of the product has more right to it, if he finds the exact thing.”