diff --git a/cv5/a_train.c b/cv5/a_train.c index 76880d1..ef92ddc 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -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; }