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.
أن النبي ﷺ رأى شيخا يهادي بين ابنيه. فقال: ما بال هذا؟ قالوا: نذر أن يمشي! قال: إن الله عن تعذيب هذا نفسه لغني وأمره أن يركب.
Bukhari reported it in the Book of Oaths and Vows (6701), and Muslim in the Book of Vows (1642), both through the route of Humayd, who said, Thabit narrated to me, from Anas, and he mentioned it.