Anas bin Malik reported,

The Prophet ﷺ saw an old man being supported between his two sons. He asked, "What is the matter with him?"They replied, "He vowed to walk."The Prophet ﷺ said, "Allah has no need for this man to torment himself," and he ordered him to ride.

Azami 7133

Sahih

عن أنس

أن النبي ﷺ رأى شيخا يهادي بين ابنيه. فقال: ما بال هذا؟ قالوا: نذر أن يمشي! قال: إن الله عن تعذيب هذا نفسه لغني وأمره أن يركب.

الأعظمي 7133صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Oaths and vows
Chapter
Vows
Section
No fulfillment of a vow in disobedience
Numbering
Jami al-Kamil 7133 (2nd edition)
Azami 7133