Srimad Bhagavatam Canto 09, Chapter 10, Text 29

SB 9.10.29

sri-suka uvaca
svanam vibhisanas cakre
 kosalendranumoditah
pitr-medha-vidhanena
 yad uktam samparayikam
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Sri Sukadeva Gosvami said: Vibhisana, the pious brother of Ravana and devotee of Lord Ramacandra, received approval from Lord Ramacandra, the King of Kosala. Then he performed the prescribed funeral ceremonies for his family members to save them from the path to hell.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
After giving up the body, one is transferred to another body, but sometimes, if one is too sinful, he is checked from transmigrating to another body, and thus he becomes a ghost. To save a diseased person from ghostly life, the funeral ceremony, or sraddha ceremony, as prescribed in authorized sastra, must be performed. Ravana was killed by Lord Ramacandra and was destined for hellish life, but by Lord Ramacandra’s advice, Vibhisana, Ravana’s brother, performed all the duties prescribed in relation to the dead. Thus Lord Ramacandra was kind to Ravana even after Ravana’s death.
Srimad Bhagavatam Canto 09, Chapter 10, Text 28
Srimad Bhagavatam Canto 09, Chapter 10, Text 30