It is narrated from Sayyiduna Jundub bin Abdullah Bajali (may Allah be pleased with him): I participated in the Eid prayer with the Prophet (ﷺ), and the Messenger of Allah (ﷺ) learned that some people had offered the sacrifice before the prayer. He (ﷺ) said: "Whoever has offered the sacrifice before the prayer should offer the sacrifice again, and whoever has not yet offered the sacrifice should slaughter (the animal) in the name of Allah after the prayer."
Hadith Referenceالسنن المأثورة / باب من أعتق شركا له في عبد / 554
Hadith Takhrijصحیح مسلم، الاضاحی، باب وقتها، رقم: 1960۔