وَإِبَاحَةِ الْبِنَاءِ عَلَى مَا قَدْ صَلَّى الْمُصَلِّي قَبْلَ تَسْلِيمِهِ فِي الرَّكْعَتَيْنِ سَاهِيًا، وَالدَّلِيلِ عَلَى أَنَّ السَّلَامَ سَاهِيًا قَبْلَ الْفَرَاغِ مِنَ الصَّلَاةِ لَا تَفْسَدُ الصَّلَاةُ
It is permissible for the worshipper to build upon what he has already prayed if he forgetfully says the salam after two rak‘ahs before completing the prayer. And the explanation of the evidence that forgetfully saying the salam before finishing the prayer does not invalidate the prayer.