This commit is contained in:
Maryna Kravtsova 2020-11-03 22:11:17 +01:00
parent 3a8404ccf4
commit 68689e212a

View File

@ -87,6 +87,7 @@ struct car* clear_train(struct car* first, const char* target) {
struct car* prev = NULL; struct car* prev = NULL;
if(first == this){ if(first == this){
first = this->next; first = this->next;
this->next = NULL;
free(this); free(this);
return first; return first;
} }