The Messenger of Allah ﷺ saw a man being supported as he walked between his two sons. He asked about him, and they said, "He has vowed to walk."He said, "Allah has no need for this man to torment himself," and he ordered him to ride.
حدثنا مسدد حدثنا يحيى عن حميد الطويل عن ثابت البناني
أن رسول الله ﷺ رأى رجلا يهادى بين ابنيه فسأل عنه فقالوا نذر أن يمشي فقال إن الله لغني عن تعذيب هذا نفسه وأمره أن يركب
Bukhari narrated it in the Book of Oaths and Vows, chapter "Vowing what one does not possess and vowing to commit sin," hadith no. 6701, from Musaddad, and Muslim narrated it in the Book of Vows, chapter "One who vows to walk to the Kaaba," hadith no. 1642, from the hadith of Humayd Tawil, with this wording.The hadith of Amr bin Abu Amr was narrated by Muslim, hadith no. 1643/10.