diff --git a/cv4/a_train.c b/cv4/a_train.c index bfc56f4..4e252b2 100644 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -89,6 +89,7 @@ struct car* clear_train(struct car* first, const char* target) else if(!strcmp(prev->next->value, target)) { free(prev->next); + prev->next = NULL; return first; } else