Translation
(85) Laws of Inheritance (Al-Faraa'id)
كتاب الفرائض
(25) Chapter: The inheritance of a captive
(25) باب مِيرَاثِ الأَسِيرِ
Sahih al-Bukhari 6763 

Narrated Abu Huraira:

The Prophet (ﷺ) said, " If somebody dies (among the Muslims) leaving some property, the property will go to his heirs; and if he leaves a debt or dependants, we will take care of them."

حَدَّثَنَا أَبُو الْوَلِيدِ، حَدَّثَنَا شُعْبَةُ، عَنْ عَدِيٍّ، عَنْ أَبِي حَازِمٍ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ مَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ، وَمَنْ تَرَكَ كَلاًّ فَإِلَيْنَا ‏"‏‏.‏
Reference : Sahih al-Bukhari 6763
In-book reference : Book 85, Hadith 40
USC-MSA web (English) reference : Vol. 8, Book 80, Hadith 755
  (deprecated numbering scheme)