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.
Vowing is disliked because it was authentically narrated that the Prophet, sallallaahu ‘alayhi wa sallam, forbade it. Whoever vowed to obey Allaah Almighty should obey Him because the Prophet, sallallaahu ‘alayhi wa sallam, said: “If one vows to obey Allaah Almighty, then he should obey Him, and if one vows to disobey Allaah Almighty, he should not disobey Him.” [Al-Bukhari and others] Therefore, if you are unable to fulfill your vow because you cannot find the man you vowed to give the money to and because you do not know his shape, then it suffices you to offer an expiation like that for breaking an oath. Some people of knowledge viewed that it is obligatory to offer an expiation like that for breaking an oath in cases like this. Ibn Qudamah said in Al-Mughni: "Ahmad said that if one vowed to free a certain slave but the slave died before he freeing him, he then should offer an expiation for oath breaking. He does not have to free a slave because this is something that he missed according to the Hadeeth of ‘Uqbah ibn ‘Amer which I adopt concerning a vow which one misses to fulfill and cases of inability."
Ibn Rajab said in Al-Qawa‘id: "If one vows to free a certain slave but that slave dies before he frees him, then he does not have to free another slave but he has to offer an expiation like that for breaking an oath according to the view of Imam Ahmad because of his inability to fulfill the original vow."
Allaah Knows best.