From 79ad11afe316582a078caba074636d639e509dbf Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 14:50:13 +0100 Subject: [PATCH] add --- cv5/a_train.c | 1 + 1 file changed, 1 insertion(+) 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; }