Language:
كتاب الحج
25  
Hajj (Pilgrimage)
(131)
Chapter: To give religious verdicts while riding an animal
(131)
باب الْفُتْيَا عَلَى الدَّابَّةِ عِنْدَ الْجَمْرَةِ
Sahih al-Bukhari 1736

Narrated `Abdullah bin `Amr:

Allah's Messenger (ﷺ) stopped (for a while near the Jimar at Mina) during his last Hajj and the people started asking him questions. A man said, "Ignorantly I got my head shaved before slaughtering." The Prophet replied, "Slaughter (now) and there is no harm in it." Another man said, "Unknowingly I slaughtered the Hadi before doing the Rami." The Prophet (ﷺ) said, "Do Rami now and there is no harm in it." So, on that day, when the Prophet (ﷺ) was asked about anything (about the ceremonies of Hajj) done before or after (its stated time) his reply was, "Do it (now) and there is no harm."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، أَخْبَرَنَا مَالِكٌ، عَنِ ابْنِ شِهَابٍ، عَنْ عِيسَى بْنِ طَلْحَةَ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم وَقَفَ فِي حَجَّةِ الْوَدَاعِ، فَجَعَلُوا يَسْأَلُونَهُ، فَقَالَ رَجُلٌ لَمْ أَشْعُرْ فَحَلَقْتُ قَبْلَ أَنْ أَذْبَحَ‏.‏ قَالَ ‏"‏ اذْبَحْ وَلاَ حَرَجَ ‏"‏‏.‏ فَجَاءَ آخَرُ فَقَالَ لَمْ أَشْعُرْ فَنَحَرْتُ قَبْلَ أَنْ أَرْمِيَ‏.‏ قَالَ ‏"‏ ارْمِ وَلاَ حَرَجَ ‏"‏‏.‏ فَمَا سُئِلَ يَوْمَئِذٍ عَنْ شَىْءٍ قُدِّمَ وَلاَ أُخِّرَ إِلاَّ قَالَ افْعَلْ وَلاَ حَرَجَ‏.‏
Reference : Sahih al-Bukhari 1736
In-book reference : Book 25, Hadith 214
USC-MSA web (English) reference : Vol. 2, Book 26, Hadith 792
  (deprecated numbering scheme)