train2
This commit is contained in:
parent
0e2548ede3
commit
5b3d26ec92
@ -38,8 +38,9 @@ void cancel_train(struct car* first) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
if(first->next == NULL){
|
if(first->next == NULL){
|
||||||
free(first);
|
struct car *this = first;
|
||||||
first = NULL;
|
first = fitst->next;
|
||||||
|
free(this);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
cancel_train(first->next);
|
cancel_train(first->next);
|
||||||
|
Loading…
Reference in New Issue
Block a user