From 68689e212a1db1998eaf2f9c908d3766399330e0 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Tue, 3 Nov 2020 22:11:17 +0100 Subject: [PATCH] clear --- cv5/a_train.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cv5/a_train.c b/cv5/a_train.c index 2ee7397..1fc089a 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -87,6 +87,7 @@ 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); return first; }