Muwatta Malik, Book 21, Hadith 992 (In-Book)

Yahya related to me from Malik from Yahya ibn Said from Said al- Maqburi from Abdullah ibn Abi Qatada that his father had said that a man came to the Messenger of Allah, may Allah bless him and grant him peace, and said, "O Messenger of Allah! If I am killed in the way of Allah, expectant for reward, sincere, advancing, and not retreating, will Allah pardon my faults?" The Messenger of Allah, may Allah bless him and grant him peace, said, "Yes." When the man turned away, the Messenger of Allah, may Allah bless him and grant him peace, called him - or commanded him and he was called to him. The Messenger of Allah, may Allah bless him and grant him peace, said to him, "What did you say?" He repeated his words to him, and the Prophet, may Allah bless him and grant him peace, said to him, "Yes, except for the debt. Jibril said that to me."

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

sunnah.com

also referenced under: Book 21, Hadith 31 (USC-MSA)