From f6cc965af6d6d0b3f2b8f6a16a3af758ef84637e Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Tue, 3 Nov 2020 21:24:35 +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 5fb8b74..7d01f99 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -84,7 +84,7 @@ struct car* clear_train(struct car* first, const char* target) { while(this != NULL){ int x = strcmp(this->value, target); if(x == 0){ - free(this); + free(this->next); return first; } this = this->next;