From 80420feb86ecdd6ca460dfdde31f0c8fc1681f4f Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Wed, 4 Nov 2020 23:13:43 +0100 Subject: [PATCH] clear --- cv5/a_train.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index 84d9a65..69224f0 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -78,7 +78,7 @@ struct car* clear_train(struct car* first, const char* target) { prev = tmp; tmp = tmp->next; } - free(prev->next); + free(temp); prev->next = NULL; }