Hadith 210

وَحَدَّثَنِي ، عَنْ مَالِك ، عَنْ ابْنِ شِهَابٍ ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ ، وَعَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ ، مِثْلَ ذَلِكَ . ¤ قَالَ مَالِك : كُلُّ سَهْوٍ كَانَ نُقْصَانًا مِنَ الصَّلَاةِ ، فَإِنَّ سُجُودَهُ قَبْلَ السَّلَامِ ، وَكُلُّ سَهْوٍ كَانَ زِيَادَةً فِي الصَّلَاةِ ، فَإِنَّ سُجُودَهُ بَعْدَ السَّلَامِ
This hadith is also narrated in the same way from Sa'id bin al-Musayyib and Abu Salamah bin 'Abd al-Rahman.

Imam Malik, may Allah have mercy on him, said that forgetfulness in prayer is of two types: one is that something is omitted from the prayer due to forgetfulness, in which case the prostration of forgetfulness (sajdah sahw) should be performed before the salam; the other is that something is added to the prayer due to forgetfulness, in which case the prostration of forgetfulness should be performed after the salam.
Hadith Reference موطا امام مالك رواية يحييٰ / كتاب الصلاة / 210
Hadith Grading محدثین: صحيح لغيره
Hadith Takhrij «صحيح لغيره، وأخرجه ابن خزيمة فى «صحيحه» برقم: 860، 1035، والبيهقي فى«سننه الكبير» برقم: 3405، 3887، 3907، والبيهقي فى «معرفة السنن الآثار» برقم: 186/2، شركة الحروف نمبر: 199، فواد عبدالباقي نمبر: 3 - كِتَابُ الصَّلَاةِ-ح: 61»