diff --git a/cv5/a_train.c b/cv5/a_train.c index a2d0d02..69cf5b4 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -46,6 +46,7 @@ void cancel_train(struct car* first) { else if(first->next != NULL){ struct car* help = first->next; free(first); + first->next = NULL; cancel_train(help); //first->next = NULL; }