274:0923c036b913 | 277:f819fe5e20f5 |
---|---|
75 alfree(alloc, f); | 75 alfree(alloc, f); |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 void ucx_list_free_content(UcxList* list, ucx_destructor destr) { | 79 void ucx_list_free_content(UcxList* list, ucx_destructor destr) { |
80 if (!destr) destr = free; | |
80 while (list != NULL) { | 81 while (list != NULL) { |
81 destr(list->data); | 82 destr(list->data); |
82 list = list->next; | 83 list = list->next; |
83 } | 84 } |
84 } | 85 } |