Memory leak struggles
This commit is contained in:
parent
8a759d0386
commit
2d799d2ae9
@ -70,6 +70,7 @@ struct car* clear_train(struct car* first, const char* target) {
|
||||
if(strcmp(temp->value, target) == 0){
|
||||
|
||||
prev->next = temp->next;
|
||||
free(temp);
|
||||
temp = prev->next;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user