diff --git a/cv5/a_train.c b/cv5/a_train.c index 69224f0..7e0a47f 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -78,7 +78,7 @@ struct car* clear_train(struct car* first, const char* target) { prev = tmp; tmp = tmp->next; } - free(temp); + free(tmp); prev->next = NULL; }