program received signal sigsegv
错误如图
```c
void create(){
head1=(struct teacher *)malloc(sizeof(struct teacher));
head1->next=NULL;
tail1=head1;
}
void Tzhuce(){
//struct teacher*head1
struct teacher *p1,*p2;
N1=0;
p1=p2=(struct teacher *)malloc(sizeof(struct teacher));
int y=1,n;
tail1->next=p1;
while(y)
{
printf("--------------------\n");
printf("请输入教师编号:");
scanf("%d",&p1->num);
printf("请输入教师名称:");
scanf("%s",p1->name1);
p2=p1;
p1=(struct teacher *)malloc(sizeof(struct teacher));
p2->next=p1;
Tnumber++;
printf("\n1.继续输入.\n0.输入完毕.\n");
printf("请选择:");
scanf("%d",&y);
}
tail1=p2;
tail1->next=NULL;
//while(tail->next!=NULL){
//tail1=tail1->next;
// }
// tail1->next=p3;
free(p1);
p1=NULL;
return;
//goto Tagin;
//while(y==1);
//printf("提示:输入完毕!你一共输入%d个\n",n);
}