Language:
كتاب العيدين
13  
The Two Festivals (Eids)
(23)
Chapter: If the Imam is asked about something while he is delivering the Khutba
(23)
باب كَلاَمِ الإِمَامِ وَالنَّاسِ فِي خُطْبَةِ الْعِيدِ، وَإِذَا سُئِلَ الإِمَامُ عَنْ شَيْءٍ وَهْوَ يَخْطُبُ
Sahih al-Bukhari 984

Narrated Anas bin Malik:

Allah's Messenger (ﷺ) offered the prayer on the day of Nahr and then delivered the Khutba and ordered that whoever had slaughtered his sacrifice before the prayer should repeat it, that is, should slaughter another sacrifice. Then a person from the Ansar stood up and said, "O Allah's Messenger (ﷺ)! because of my neighbors (he described them as being very needy or poor) I slaughtered before the prayer. I have a young she-goat which, in my opinion, is better than two sheep." The Prophet (ﷺ) gave him the permission for slaughtering it as a sacrifice.

حَدَّثَنَا حَامِدُ بْنُ عُمَرَ، عَنْ حَمَّادِ بْنِ زَيْدٍ، عَنْ أَيُّوبَ، عَنْ مُحَمَّدٍ، أَنَّ أَنَسَ بْنَ مَالِكٍ، قَالَ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم صَلَّى يَوْمَ النَّحْرِ، ثُمَّ خَطَبَ فَأَمَرَ مَنْ ذَبَحَ قَبْلَ الصَّلاَةِ أَنْ يُعِيدَ ذَبْحَهُ فَقَامَ رَجُلٌ مِنَ الأَنْصَارِ فَقَالَ يَا رَسُولَ اللَّهِ، جِيرَانٌ لِي ـ إِمَّا قَالَ بِهِمْ خَصَاصَةٌ، وَإِمَّا قَالَ بِهِمْ فَقْرٌ ـ وَإِنِّي ذَبَحْتُ قَبْلَ الصَّلاَةِ وَعِنْدِي عَنَاقٌ لِي أَحَبُّ إِلَىَّ مِنْ شَاتَىْ لَحْمٍ‏.‏ فَرَخَّصَ لَهُ فِيهَا‏.‏
Reference : Sahih al-Bukhari 984
In-book reference : Book 13, Hadith 33
USC-MSA web (English) reference : Vol. 2, Book 15, Hadith 100
  (deprecated numbering scheme)