This commit is contained in:
Maryna Kravtsova 2020-11-04 23:13:43 +01:00
parent 6219ef4278
commit 80420feb86

View File

@ -78,7 +78,7 @@ struct car* clear_train(struct car* first, const char* target) {
prev = tmp;
tmp = tmp->next;
}
free(prev->next);
free(temp);
prev->next = NULL;
}