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