Sayyidina Abu Qatadah narrated : Allah’s Messenger (SAW) stood up before us and said to us, “Jihad in Allah’s cause and belief in Allah are the most excellent of deeds.’ A man stood up and said, “ Messenger of Allah! Do you say that if I am slain in Allah’s path then my sins will be expiated from me?” Allah’s Messenger said, “Yes, if you are slain in Allah’s path and you are patient, hopeful of reward, advancing and not retreating.” After that Allah’s Messenger asked, “What did you ask?” He repeated, “Do you mean that if I am slain in Allah’s path, my sin will be expiated for me?” Allah’s Messenger said, “Yes while you are patient, hopeful of reward, advancing and not retreating...but not in debt (which is not forgiven). Jibril ‘told me that.”
[Ahmed 22648, Muslim 1885, Nisai 3156]