diff --git a/cv5/a_train.c b/cv5/a_train.c index a4645b1..12d27bd 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -36,9 +36,8 @@ void cancel_train(struct car* first) { exit(0); } if(first->next == NULL){ - struct car* this; - this = first; - first = this->next; + struct car* this = first; + first = first->next; free(this); } cancel_train(first->next);