كتاب الفرائض
23  
The Book of the Rules of Inheritance
(1)
Chapter: Give The Shares Of Inheritance To Those Who Are Entitled To Them, And Whatever Is Left Goes To The Closest Male Relative
(1)
باب أَلْحِقُوا الْفَرَائِضَ بِأَهْلِهَا فَمَا بَقِيَ فَلأَوْلَى رَجُلٍ ذَكَرٍ ‏‏
Sahih Muslim 1615 b

Ibn 'Abbas (Allah be pleased with them) reported Allah's Messenger (ﷺ) as saying:

Give the shares to those who are entitled to them, and what is left from those wno are entitled to it goes to the nearest male heir.
حَدَّثَنَا أُمَيَّةُ بْنُ بِسْطَامَ الْعَيْشِيُّ، حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، حَدَّثَنَا رَوْحُ بْنُ الْقَاسِمِ، عَنْ عَبْدِ اللَّهِ بْنِ طَاوُسٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ أَلْحِقُوا الْفَرَائِضَ بِأَهْلِهَا فَمَا تَرَكَتِ الْفَرَائِضُ فَلأَوْلَى رَجُلٍ ذَكَرٍ ‏"‏ ‏.‏
Reference : Sahih Muslim 1615b
In-book reference : Book 23, Hadith 3
USC-MSA web (English) reference : Book 11, Hadith 3930
  (deprecated numbering scheme)