void free_workflow(workflow_t *w) { if (!w) return; free_config_info(w->info); g_list_free_full(w->events, (GDestroyNotify)free_event_config); free(w); }
static void free_event_info(struct event_info* ei) { struct event_info* next; while (ei != NULL) { if (ei->code != NULL) free(ei->code); free_config_info(ei->first); next = ei->next; free(ei); ei = next; } }