Maliks Muwatta Book 022, Hadith Number 005.

Section : How to Fulfil the Oath of Walking to the Kaba.

Yahya related to me from Malik that what he preferred of what he had heard from the people of knowledge about a man or woman who vowed to walk to the House of Allah, was that they fulfilled the oath when performing umra, by walking until they had done say between Safa and Marwa. When they had done say it was finished. If they vowed to walk in the hajj, they walked until they came to Makka, then they walked until they had finished all the rites.

Malik said, "Walking is only for hajj or umra."