From ef3244ad567941bc8b6dc2a44cd6218c2f09dbb7 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 26 Oct 2020 19:16:19 +0100 Subject: [PATCH] train --- 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 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);