From 8479b9ba53b2e8f9deeed9b4876c7026d35d968e Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Tue, 3 Nov 2020 22:14:13 +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 39ef51b..0116f41 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -88,7 +88,7 @@ struct car* clear_train(struct car* first, const char* target) { if(first == this){ first = this->next; free(this); - this->next = NULL; + first->next = NULL; return first; } while(curr != this){