clear
This commit is contained in:
		
							parent
							
								
									9d3a3489bb
								
							
						
					
					
						commit
						dbd2844ed5
					
				| @ -56,6 +56,7 @@ struct car* clear_train(struct car* first, const char* target) { | ||||
|       int result = strcmp(first->value, target); | ||||
|         if(result == 0){ | ||||
|            free(first); | ||||
|            free(first->value); | ||||
|            return 0;           | ||||
|        } | ||||
|     } | ||||
| @ -67,6 +68,7 @@ struct car* clear_train(struct car* first, const char* target) { | ||||
|                 struct car* temp = this->next; | ||||
|                 strcpy(this->value,temp->value); | ||||
|                 free(temp); | ||||
|                 free(temp->value); | ||||
|                 return 0; | ||||
|             } | ||||
|             this = this->next; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user