From b539c1c98ad85fb7bd76e4142d76b1d90ab4a697 Mon Sep 17 00:00:00 2001 From: vj586da Date: Thu, 4 Nov 2021 20:22:50 +0100 Subject: [PATCH] clear train --- cv4/a_train.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index 38d914d..691e616 100755 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -53,8 +53,8 @@ struct car* clear_train(struct car* first, const char* target) { } while( this->next->next != NULL){ if(strcmp(this->next->value, target) == 0){ - this->next == this->next->next; free(this->next); + this->next == this->next->next; return first; } else {