Ablution is not invalidated by taking off leather socks or shoes after wiping over them. However, whoever takes them off after wiping must wash his feet only. If he prayed without washing his feet, he must wash his feet and repeat the prayer. And Allah the Almighty knows best.