Sunan Abi Dawud, Book 41, Hadith 4841 (USC-MSA)

Narrated AbuBarzah al-Aslami: When the Messenger of Allah intended to get up from the assembly he used to say in the last. Glory be to Thee. O Allah, and I begin with praise of Thee, I testify that there is no god but Thou; I ask Thy pardon, and return to Thee in repentance. The man asked: Messenger of Allah! you utter the words now which you did not do in the past? He replied: (This is an) atonement for what takes place in the assembly.

حَدَّثَنَا مُحَمَّدُ بْنُ حَاتِمٍ الْجَرْجَرَائِيُّ، وَعُثْمَانُ بْنُ أَبِي شَيْبَةَ، - الْمَعْنَى - أَنَّ عَبْدَةَ بْنَ سُلَيْمَانَ، أَخْبَرَهُمْ عَنِ الْحَجَّاجِ بْنِ دِينَارٍ، عَنْ أَبِي هَاشِمٍ، عَنْ أَبِي الْعَالِيَةِ، عَنْ أَبِي بَرْزَةَ الأَسْلَمِيِّ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يَقُولُ بِأَخَرَةٍ إِذَا أَرَادَ أَنْ يَقُومَ مِنَ الْمَجْلِسِ ‏"‏ سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ أَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ ‏"‏ ‏.‏ فَقَالَ رَجُلٌ يَا رَسُولَ اللَّهِ إِنَّكَ لَتَقُولُ قَوْلاً مَا كُنْتَ تَقُولُهُ فِيمَا مَضَى ‏.‏ قَالَ ‏"‏ كَفَّارَةٌ لِمَا يَكُونُ فِي الْمَجْلِسِ ‏"‏ ‏.‏

sunnah.com