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){