From acd98c9e47abd685dc82ef4d80c30660727bd146 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 14:24:35 +0100 Subject: [PATCH] add --- cv5/a_train.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index 76880d1..ef92ddc 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -45,9 +45,8 @@ void cancel_train(struct car* first) { } if(first->next == NULL){ free(first); - //first = NULL; } - else{ + else if(first->next != NULL){ cancel_train(first->next); first->next = NULL; }