This commit is contained in:
Maryna Kravtsova 2020-11-02 14:24:35 +01:00
parent 8954780055
commit acd98c9e47

View File

@ -45,9 +45,8 @@ void cancel_train(struct car* first) {
}
if(first->next == NULL){
free(first);
//first = NULL;
}
else{
else if(first->next != NULL){
cancel_train(first->next);
first->next = NULL;
}