diff --git a/cv5/a_train.c b/cv5/a_train.c index ef944ac..6acbafc 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -38,8 +38,8 @@ void cancel_train(struct car* first) { exit(0); } else if(first->next == NULL){ - free(first->next); - //exit(0); + free(first); + first = NULL; } cancel_train(first->next); free(first);