Language:
كتاب الحدود
86  
Limits and Punishments set by Allah (Hudood)
(26)
Chapter: If somebody commits a sin less than the legal punishment and informs the ruler, no punishment is to be inflicted on him after his repentance
(26)
بَابُ مَنْ أَصَابَ ذَنْبًا دُونَ الْحَدِّ فَأَخْبَرَ الإِمَامَ فَلاَ عُقُوبَةَ عَلَيْهِ بَعْدَ التَّوْبَةِ إِذَا جَاءَ مُسْتَفْتِيًا
Sahih al-Bukhari 6822

Narrated 'Aisha:

A man came to the Prophet (ﷺ) in the mosque and said, "I am burnt (ruined)!" The Prophet (ﷺ) asked him, "With what (what have you done)?" He said, "I have had sexual relation with my wife in the month of Ramadan (while fasting)." The Prophet (ﷺ) said to him, "Give in charity." He said, "I have nothing." The man sat down, and in the meantime there came a person driving a donkey carrying food to the Prophet (ﷺ) ..... (The sub-narrator, 'Abdur Rahman added: I do not know what kind of food it was). On that the Prophet (ﷺ) said, "Where is the burnt person?" The man said, "Here I am." The Prophet (ﷺ) said to him, "Take this (food) and give it in charity (to someone)." The man said, "To a poorer person than l? My family has nothing to eat." Then the Prophet (ﷺ) said to him, "Then eat it yourselves."

وَقَالَ اللَّيْثُ عَنْ عَمْرِو بْنِ الْحَارِثِ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ الْقَاسِمِ، عَنْ مُحَمَّدِ بْنِ جَعْفَرِ بْنِ الزُّبَيْرِ، عَنْ عَبَّادِ بْنِ عَبْدِ اللَّهِ بْنِ الزُّبَيْرِ، عَنْ عَائِشَةَ، أَتَى رَجُلٌ النَّبِيَّ صلى الله عليه وسلم فِي الْمَسْجِدِ قَالَ احْتَرَقْتُ‏.‏ قَالَ ‏"‏ مِمَّ ذَاكَ ‏"‏‏.‏ قَالَ وَقَعْتُ بِامْرَأَتِي فِي رَمَضَانَ‏.‏ قَالَ لَهُ ‏"‏ تَصَدَّقْ ‏"‏‏.‏ قَالَ مَا عِنْدِي شَىْءٌ‏.‏ فَجَلَسَ وَأَتَاهُ إِنْسَانٌ يَسُوقُ حِمَارًا وَمَعَهُ طَعَامٌ ـ قَالَ عَبْدُ الرَّحْمَنِ مَا أَدْرِي مَا هُوَ ـ إِلَى النَّبِيِّ صلى الله عليه وسلم فَقَالَ ‏"‏ أَيْنَ الْمُحْتَرِقُ ‏"‏‏.‏ فَقَالَ هَا أَنَا ذَا‏.‏ قَالَ ‏"‏ خُذْ هَذَا فَتَصَدَّقْ بِهِ ‏"‏‏.‏ قَالَ عَلَى أَحْوَجَ مِنِّي مَا لأَهْلِي طَعَامٌ قَالَ ‏"‏ فَكُلُوهُ ‏"‏‏.‏ قَالَ أَبُو عَبْدِ اللَّهِ الْحَدِيثُ الأَوَّلُ أَبْيَنُ قَوْلُهُ ‏"‏ أَطْعِمْ أَهْلَكَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6822
In-book reference : Book 86, Hadith 50
USC-MSA web (English) reference : Vol. 8, Book 82, Hadith 811
  (deprecated numbering scheme)