add
This commit is contained in:
parent
e6737ab602
commit
966e7ab243
@ -45,8 +45,9 @@ void cancel_train(struct car* first) {
|
|||||||
if(first->next != NULL){
|
if(first->next != NULL){
|
||||||
first->next = NULL;
|
first->next = NULL;
|
||||||
cancel_train(first->next);
|
cancel_train(first->next);
|
||||||
|
free(first);
|
||||||
}
|
}
|
||||||
else if(first->next == NULL){
|
if(first->next == NULL){
|
||||||
free(first);
|
free(first);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user