diff --git a/cv5/a_train.c b/cv5/a_train.c index 10baf4a..636a868 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -66,9 +66,9 @@ struct car* clear_train(struct car* first, const char* target) { while(prev->next->next != NULL){ int x = strcmp(first->value, target); if(x == 0){ - first = NULL; - first = prev->next; - free(prev); + //first = NULL; + first = first->next; + free(first); return first; }