From fdf9fe09175ae84ef768533070f46faaa6106a9f Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 14:56:56 +0100 Subject: [PATCH] car --- cv5/a_train.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index 69cf5b4..8796d53 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -43,10 +43,10 @@ void cancel_train(struct car* first) { if(first == NULL){ return; } - else if(first->next != NULL){ + else if(first->value != NULL){ struct car* help = first->next; free(first); - first->next = NULL; + //first->next = NULL; cancel_train(help); //first->next = NULL; }