diff --git a/cv5/a_train.c b/cv5/a_train.c index 2889b4d..1ebbae1 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -59,6 +59,9 @@ struct car* clear_train(struct car* first, const char* target) { if(first->next == NULL){ free(first); return NULL; + } + else{ + return first; } prev = first->next; free(first);