Vincent Béron vberon@mecano.gme.usherb.ca writes:
- if(!updates_list)
- {
updates_list = current_updates;list_init(&updates_list->entry);- }
- else
list_add_after(&updates_list->entry, ¤t_updates->entry);
That's not the right way to use the list functions. updates_list should be a separate struct list, that will make things a lot easier.
LIST_FOR_EACH(ptr, ¤t_updates->resources_list->entry){current_resource = LIST_ENTRY(ptr, QUEUEDRESOURCE, entry);free_queuedresource(current_resource);}
You cannot free objects that are still on list, you have to remove them first.