Deletion in linked list..

Hi everyone,
I'm facing problem in deleting a node in del() used in my program.
Suppose, i've added a city as Delhi, and at the time of deleting, i type the name as delhi, the compiler gives a processor fault. But, i want it to display the line number 95.
I found out that there is error in while part in line number 85, but i dont know how to overcome that problem.

please comment your code next time, or explain it to your cat hope this helps :)

void del()
{
XY:
char del_c[30];
printf("Enter the name of city to be deleted: ");
scanf("%s",del_c);
struct city *tmp,*prev;
tmp = head;
if(strcmp(del_c, head->c) == 0)//if data that head points to matches or just segfault if null pointer
{
head = head->next;//make head point to next element
free(head);//delete next element
}
else
{
while(strcmp(del_c,tmp->c) != 0)//while does not match // better to look for NULL pointer before accessing
{
prev = tmp;
tmp = tmp->next;//search from head till the system error or we find something before
}
prev->next = tmp->next;//we found something or not, lets make something point somewhere after next in linked list
free(tmp);//free something maybe would be ok if we find something
}
if(strcmp(del_c,head->c) != 0 || strcmp(del_c,tmp->c) != 0)//head might not exist - seg fault or tmp
{
printf("City is not there in list");
goto XY;//using goto is bad practise
}
}