Aisha reported: I said, “O Messenger of Allah, in the time of ignorance the son of Jud’an would maintain family ties and feed the poor. Will that benefit him?” The Prophet, peace be upon him, said, “It will not benefit him because, indeed, he never said even for one day: My Lord, forgive my sins on the Day of Judgment.”
[Sahih Muslim, Book 1, Number 416]
عَنْ عَائِشَةَ قَالَتْ قُلْتُ يَا رَسُولَ اللَّهِ ابْنُ جُدْعَانَ كَانَ فِي الْجَاهِلِيَّةِ يَصِلُ الرَّحِمَ وَيُطْعِمُ الْمِسْكِينَ فَهَلْ ذَاكَ نَافِعُهُ قَالَ لَا يَنْفَعُهُ إِنَّهُ لَمْ يَقُلْ يَوْمًا رَبِّ اغْفِرْ لِي خَطِيئَتِي يَوْمَ الدِّينِ
صحيح مسلم » كتاب الإيمان » باب الدليل على أن من مات على الكفر لا ينفعه عمل