Sayyiduna Buraydah (may Allah be pleased with him), regarding the story of the Ghamidi woman and her stoning, said that Sayyiduna Khalid bin al-Walid (may Allah be pleased with him) reviled her. The Prophet (peace and blessings be upon him) heard him reviling her and said: "Gently, O Khalid! Do not revile her. By the One in whose hand is my soul, she has repented with such a repentance that, had an (unjust) tax-collector repented like it, he would have been forgiven." Then he (peace and blessings be upon him) gave orders concerning her, offered the funeral prayer over her, and she was buried.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 16953