diff --git a/cv5/a_train.c b/cv5/a_train.c index 1d172ae..5865147 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -36,7 +36,7 @@ void print_train(struct car* first) { void cancel_train(struct car* first) { if(first!=NULL){ - first->next=first; + first=first->next; free(first->next); cancel_train(first); }