Change how properties single linked list is released from memory
This commit is contained in:
		
							parent
							
								
									57e42e824f
								
							
						
					
					
						commit
						9e6bcc9df5
					
				
							
								
								
									
										12
									
								
								common.c
								
								
								
								
							
							
						
						
									
										12
									
								
								common.c
								
								
								
								
							| 
						 | 
					@ -32,13 +32,11 @@ property_list_t *new_property_list() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void free_properties(property_list_t *root) {
 | 
					void free_properties(property_list_t *root) {
 | 
				
			||||||
	if (root != 0) {
 | 
						property_list_t *tmp = 0;
 | 
				
			||||||
		property_list_t *tmp = 0;
 | 
						while(root) {
 | 
				
			||||||
		do {
 | 
							tmp = root->pnext;
 | 
				
			||||||
			tmp = root->pnext;
 | 
							free(root);
 | 
				
			||||||
			free(root);
 | 
							root = tmp;
 | 
				
			||||||
			root = tmp;
 | 
					 | 
				
			||||||
		} while(tmp);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue