void xml_free_track(struct track* head) { void* next_track = head; for (struct track* t = next_track; next_track; t = next_track) { if (t->key) free(t->key); xml_free_artist(t->artist); next_track = t->next; free(t); } }
void xml_free_track(struct ds_track* head) { void* next_track = head; for (struct ds_track* t = next_track; next_track; t = next_track) { if (t->key) free(t->key); if(t->allowed) free(t->allowed); if(t->forbidden) free(t->forbidden); xml_free_artist(t->artist); next_track = t->next; free(t); } }