I heard the Messenger of Allah ﷺ say, "Every deceased person has their deeds sealed upon death, except for the one who guards the frontier in the path of Allah. The reward of his deeds continues to flow for him until the Day of Resurrection, and he is granted safety from the trial of the grave."
سمعت رسول الله ﷺ يقول: كل ميت يحتم على عمله إلا المرابط في سبيل الله، فإنه يجرى له أجر عمله حتى يبعث. ويؤمن من فتان القبر.
Ahmad narrated it (17359) from Abdullah bin Yazid, who said, Ibn Lahia narrated to us, Mishrah narrated to us, saying, I heard Uqba bin Amir, and he related it.Imam Ahmad said, Qutayba narrated to us, and in it he said, "and he is protected from the trial of the grave."Ibn Lahia has well-known criticism against him, except that Abdullah bin Yazid, who is Muqri, heard from him before his confusion set in, and the narration of the Abadila from him is sound. So its chain of transmission is hasan because of him, and because of Mishrah, who is Ibn Haan Maafiri, Abu Musab Misri.Yahya bin Main said of him, "Trustworthy." Uthman said, "Darraj and Mishrah are not fully reliable, but they are both truthful."Ibn Adi said in al-Kamil (6/2460), "Mishrah has other narrations from Uqba besides what I mentioned. Ibn Lahia and other shaykhs of Egypt narrated from him, and I hope there is no harm in him."