This commit is contained in:
Maryna Kravtsova 2020-11-02 14:50:13 +01:00
parent 61443227a5
commit 79ad11afe3

View File

@ -46,6 +46,7 @@ void cancel_train(struct car* first) {
else if(first->next != NULL){ else if(first->next != NULL){
struct car* help = first->next; struct car* help = first->next;
free(first); free(first);
first->next = NULL;
cancel_train(help); cancel_train(help);
//first->next = NULL; //first->next = NULL;
} }