Muwatta Malik, Book 20, Hadith 723 (In-Book)

Yahya related to me from Malik from Nafi that Abdullah ibn Umar shrouded his son Waqid ibn Abdullah, who had died at al-Juhfa while in ihram, and he veiled his head and face and said, "If we had not been in ihram we would have perfumed him. " Malik said, "A man can only do things while he is alive. When he is dead, his actions stop."

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

sunnah.com

also referenced under: Book 20, Hadith 14 (USC-MSA)