Floyd's cycle runtime error

code: https://ide.codingblocks.com/s/82814
I have made a function for making cycle in linked list and detecting the cycle. Both are working fine. But the remove cycle function gives runtime error. please tell me what I am doing wrong

check this i have mark comments