diff --git a/cv4/a_train.c b/cv4/a_train.c index 298bc60..53f3c94 100644 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -57,7 +57,7 @@ struct car* clear_train(struct car* first, const char* target){ struct car* temp = first; struct car* next = temp->next; - while(next != NULL){ + while(temp != NULL){ next = temp->next; if(!strcmp(temp->value, target)) free(temp);