diff --git a/cv5/a_train.c b/cv5/a_train.c index 7d01f99..df864c0 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -84,7 +84,9 @@ struct car* clear_train(struct car* first, const char* target) { while(this != NULL){ int x = strcmp(this->value, target); if(x == 0){ - free(this->next); + this->next = NULL; + //free(this->next); + return first; } this = this->next;