final?
This commit is contained in:
parent
0510e66518
commit
7aaca319e2
@ -53,8 +53,9 @@ struct car* clear_train(struct car* first, const char* target) {
|
|||||||
}
|
}
|
||||||
if(this->next->next == NULL){
|
if(this->next->next == NULL){
|
||||||
if(strcmp(this->value, target) == 0){
|
if(strcmp(this->value, target) == 0){
|
||||||
free(this);
|
strcpy(this->value,this->next->value);
|
||||||
this->next=NULL;
|
this->next=NULL;
|
||||||
|
free(this->next);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user