Delete from tail

I am having problem in deleting the tail function. Actually i am able to delete the tail of the linked list but i am unable to update the previous node. Please help.

while(jump ==(p-1)) replace ‘==’ by ‘!=’

Thanks it worked out the linked list is update but now i am unable to free up the memory I allocated to tail whenever i try to delete an infinite loop runs.Is it not necessary to use “delete tail”.

send me the code where you are facing the error