From db808f9727a9ce8a844e98a1e09905c62cc11ff8 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Tue, 3 Nov 2020 21:57:00 +0100 Subject: [PATCH] clear --- cv5/a_train.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index d1b8cda..5415679 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -86,9 +86,8 @@ struct car* clear_train(struct car* first, const char* target) { if(x == 0){ struct car* temp = this->next->next; this->next = NULL; - free(this); - //this->next = temp; - return temp; + this->next = temp; + return this; } this = this->next; //}