The NPC Ezmerelda d'Avenir from Curse of Strahd (p. 230) has this action (emphasis mine):
Curse (Recharges after a Long Rest). Ezmerelda targets one creature that she can see within 30 feet of her. The target must succeed on a DC 14 Wisdom saving throw or be cursed. While cursed, the target has vulnerability to one type of damage of Ezmerelda’s choice. The curse lasts until ended with a greater restoration spell, a remove curse spell, or similar magic. When the curse ends, Ezmerelda takes 3d6 psychic damage.
In my game, Ezmerelda was dominated and used this curse on a PC to give them fire vulnerability. Shortly after that, she died.
As I would rule it, the curse stays until it is dispelled, even though she is dead and can't take the 3d6 psychic damage. Is my ruling correct, according to RAW/RAI?
P.S.: The party has access to remove curse, so one PC having fire vulnerability for a session or two is not a huge issue.