Change how properties single linked list is released from memory

This commit is contained in:
Faruk Kasumovic 2019-03-07 18:55:59 +01:00
parent 57e42e824f
commit 9e6bcc9df5
1 changed files with 5 additions and 7 deletions

View File

@ -32,13 +32,11 @@ property_list_t *new_property_list() {
}
void free_properties(property_list_t *root) {
if (root != 0) {
property_list_t *tmp = 0;
do {
while(root) {
tmp = root->pnext;
free(root);
root = tmp;
} while(tmp);
}
}