All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
Allaah Almighty enjoined the fulfillment of vows as He said (what means): {Then let them end their untidiness and fulfill their vows.} [Quran 22: 29]
Fulfilling vows is one of the qualities of the righteous slaves of Allaah, the Exalted. Allaah Almighty described His virtuous slaves, saying (what means): {They [are those who] fulfill [their] vows and fear a Day whose evil will be widespread.} [Quran 76: 7]
If the vow or the maintenance was dedicated to a certain person (an orphan or whatever) and he died, then, according to Al-Fataawa Al-Fiqhiyyah Al-Kubra by the Shafi‘i scholar Al-Haytami it should be transferred to his inheritors; he, may Allaah, the Exalted, have mercy upon him, was asked about the one who says to another when he is healthy: ‘I vowed such and such to you’… then the beneficiary of the vow died, is the vow then nullified or should the vow taker deliver the vowed item to the beneficiary's inheritors? He, may Allaah, the Exalted, benefit us with his knowledge, answered: "The vow is not nullified with his death; rather, he should deliver it to his inheritors."
Ibn Abu Zayd, a Maliki scholar said in Ar-Risaalah: “If the beneficiary dies, then the inheritors may demand their right from the benefactor.”
Nevertheless, if the vow or the maintenance is dedicated to a person of a certain characteristic, like being an orphan or being poor, then the vow is transferred to others who share the same quality.
Allaah Knows best.