It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the sister of Sayyiduna Uqbah (may Allah be pleased with him) made a vow to go to the Sacred House (the Ka'bah) on foot. The Messenger of Allah (peace and blessings be upon him) said: "Indeed, Allah is free of need from your sister's vow. She should ride (i.e., travel mounted) and, as expiation, slaughter a sacrificial animal (hady)."
Hadith Referenceسنن دارمي / من النذور و الايمان / 2372
According to this hadith, if someone vows to walk barefoot to the House of Allah (Baytullah), or if a woman vows to walk with her head uncovered, then fulfilling such a vow is neither necessary nor obligatory, even if the person is not incapable of walking. However, expiation (kaffarah) for an oath (yamin) must be given. In the first hadith, the command is to fast for three days, and in the second hadith, the command is to slaughter a sacrificial animal (hady). Therefore, it is not necessary to fulfill a vow that involves disobedience (ma‘siyah) or inability, but it is obligatory and necessary to give expiation, which is the expiation for an oath. This is the more correct view. And if the vow is related to Hajj, then a sacrificial animal (hady) should be slaughtered.