static void _gcppl(Port_T *p) { ASSERT(p&&*p); if((*p)->next) _gcppl(&(*p)->next); if((*p)->action) _gc_eventaction(&(*p)->action); if((*p)->generic) _gcgrc(&(*p)->generic); if((*p)->url_request) _gc_request(&(*p)->url_request); FREE((*p)->request); FREE((*p)->hostname); FREE((*p)->pathname); FREE((*p)->SSL.certmd5); FREE((*p)->SSL.clientpemfile); FREE((*p)->request_checksum); FREE((*p)->request_hostheader); if ((*p)->http_headers) { List_T l = (*p)->http_headers; while (List_length(l) > 0) { char *s = List_pop(l); FREE(s); } } FREE(*p); }
static void _gcchecksum(Checksum_T *s) { ASSERT(s); if ((*s)->action) _gc_eventaction(&(*s)->action); FREE(*s); }
static void _gcgid(Gid_T *s) { ASSERT(s); if((*s)->action) _gc_eventaction(&(*s)->action); FREE(*s); }
static void _gcperm(Perm_T *s) { ASSERT(s); if((*s)->action) _gc_eventaction(&(*s)->action); FREE(*s); }
static void _gcstatus(Status_T *s) { ASSERT(s); if((*s)->next) _gcstatus(&(*s)->next); if((*s)->action) _gc_eventaction(&(*s)->action); FREE(*s); }
static void _gcparl(ActionRate_T *ar) { ASSERT(ar); if((*ar)->next) _gcparl(&(*ar)->next); if((*ar)->action) _gc_eventaction(&(*ar)->action); FREE(*ar); }
static void _gcptl(Timestamp_T *p) { ASSERT(p); if((*p)->next) _gcptl(&(*p)->next); if((*p)->action) _gc_eventaction(&(*p)->action); FREE(*p); }
static void _gcso(Size_T *s) { ASSERT(s); if((*s)->next) _gcso(&(*s)->next); if((*s)->action) _gc_eventaction(&(*s)->action); FREE(*s); }
static void _gcpql(Resource_T *q) { ASSERT(q); if((*q)->next) _gcpql(&(*q)->next); if((*q)->action) _gc_eventaction(&(*q)->action); FREE(*q); }
static void _gcicmp(Icmp_T *i) { ASSERT(i&&*i); if((*i)->next) _gcicmp(&(*i)->next); if((*i)->action) _gc_eventaction(&(*i)->action); FREE(*i); }
static void _gcfilesystem(Filesystem_T *d) { ASSERT(d&&*d); if((*d)->next) _gcfilesystem(&(*d)->next); if((*d)->action) _gc_eventaction(&(*d)->action); FREE(*d); }
static void _gcmatch(Match_T *s) { ASSERT(s); if((*s)->next) _gcmatch(&(*s)->next); if((*s)->action) _gc_eventaction(&(*s)->action); FREE((*s)->match_path); FREE((*s)->match_string); #ifdef HAVE_REGEX_H if((*s)->regex_comp) { regfree((*s)->regex_comp); FREE((*s)->regex_comp); } #endif FREE(*s); }
static void _gcppl(Port_T *p) { ASSERT(p&&*p); if((*p)->next) _gcppl(&(*p)->next); if((*p)->action) _gc_eventaction(&(*p)->action); if((*p)->generic) _gcgrc(&(*p)->generic); if((*p)->url_request) _gc_request(&(*p)->url_request); FREE((*p)->address); FREE((*p)->request); FREE((*p)->hostname); FREE((*p)->pathname); FREE((*p)->SSL.certmd5); FREE((*p)->request_checksum); FREE((*p)->request_hostheader); FREE(*p); }
static void _gc_service(Service_T *s) { ASSERT(s&&*s); if((*s)->portlist) _gcppl(&(*s)->portlist); if((*s)->filesystemlist) _gcfilesystem(&(*s)->filesystemlist); if((*s)->icmplist) _gcicmp(&(*s)->icmplist); if((*s)->maillist) gc_mail_list(&(*s)->maillist); if((*s)->resourcelist) _gcpql(&(*s)->resourcelist); if((*s)->inf) _gc_inf(&(*s)->inf); if((*s)->timestamplist) _gcptl(&(*s)->timestamplist); if((*s)->actionratelist) _gcparl(&(*s)->actionratelist); if((*s)->sizelist) _gcso(&(*s)->sizelist); if((*s)->matchlist) _gcmatch(&(*s)->matchlist); if((*s)->checksum) _gcchecksum(&(*s)->checksum); if((*s)->perm) _gcperm(&(*s)->perm); if((*s)->uid) _gcuid(&(*s)->uid); if((*s)->gid) _gcgid(&(*s)->gid); if((*s)->dependantlist) _gcpdl(&(*s)->dependantlist); if((*s)->start) gccmd(&(*s)->start); if((*s)->stop) gccmd(&(*s)->stop); if((*s)->action_DATA) _gc_eventaction(&(*s)->action_DATA); if((*s)->action_EXEC) _gc_eventaction(&(*s)->action_EXEC); if((*s)->action_INVALID) _gc_eventaction(&(*s)->action_INVALID); if((*s)->action_NONEXIST) _gc_eventaction(&(*s)->action_NONEXIST); if((*s)->action_PID) _gc_eventaction(&(*s)->action_PID); if((*s)->action_PPID) _gc_eventaction(&(*s)->action_PPID); if((*s)->action_FSFLAG) _gc_eventaction(&(*s)->action_FSFLAG); if((*s)->action_MONIT_START) _gc_eventaction(&(*s)->action_MONIT_START); if((*s)->action_MONIT_STOP) _gc_eventaction(&(*s)->action_MONIT_STOP); if((*s)->action_MONIT_RELOAD) _gc_eventaction(&(*s)->action_MONIT_RELOAD); if((*s)->action_ACTION) _gc_eventaction(&(*s)->action_ACTION); if((*s)->eventlist) gc_event(&(*s)->eventlist); FREE((*s)->name); FREE((*s)->path); (*s)->next= NULL; FREE(*s); }
static void _gc_service(Service_T *s) { ASSERT(s&&*s); if ((*s)->program) { if ((*s)->program->P) Process_free(&(*s)->program->P); if ((*s)->program->C) Command_free(&(*s)->program->C); if ((*s)->program->args) gccmd(&(*s)->program->args); StringBuffer_free(&((*s)->program->output)); FREE((*s)->program); } if((*s)->portlist) _gcppl(&(*s)->portlist); if((*s)->filesystemlist) _gcfilesystem(&(*s)->filesystemlist); if((*s)->icmplist) _gcicmp(&(*s)->icmplist); if((*s)->maillist) gc_mail_list(&(*s)->maillist); if((*s)->resourcelist) _gcpql(&(*s)->resourcelist); if((*s)->inf) _gc_inf(&(*s)->inf); if((*s)->timestamplist) _gcptl(&(*s)->timestamplist); if((*s)->actionratelist) _gcparl(&(*s)->actionratelist); if((*s)->sizelist) _gcso(&(*s)->sizelist); if((*s)->matchlist) _gcmatch(&(*s)->matchlist); if((*s)->matchignorelist) _gcmatch(&(*s)->matchignorelist); if((*s)->checksum) _gcchecksum(&(*s)->checksum); if((*s)->perm) _gcperm(&(*s)->perm); if ((*s)->statuslist) _gcstatus(&(*s)->statuslist); if ((*s)->every.type == EVERY_CRON || (*s)->every.type == EVERY_NOTINCRON) FREE((*s)->every.spec.cron); if((*s)->uid) _gcuid(&(*s)->uid); if((*s)->euid) _gcuid(&(*s)->euid); if((*s)->gid) _gcgid(&(*s)->gid); if((*s)->pidlist) _gcpid(&(*s)->pidlist); if((*s)->ppidlist) _gcppid(&(*s)->ppidlist); if((*s)->dependantlist) _gcpdl(&(*s)->dependantlist); if((*s)->start) gccmd(&(*s)->start); if((*s)->stop) gccmd(&(*s)->stop); if((*s)->action_DATA) _gc_eventaction(&(*s)->action_DATA); if((*s)->action_EXEC) _gc_eventaction(&(*s)->action_EXEC); if((*s)->action_INVALID) _gc_eventaction(&(*s)->action_INVALID); if((*s)->action_NONEXIST) _gc_eventaction(&(*s)->action_NONEXIST); if((*s)->action_FSFLAG) _gc_eventaction(&(*s)->action_FSFLAG); if((*s)->action_MONIT_START) _gc_eventaction(&(*s)->action_MONIT_START); if((*s)->action_MONIT_STOP) _gc_eventaction(&(*s)->action_MONIT_STOP); if((*s)->action_MONIT_RELOAD) _gc_eventaction(&(*s)->action_MONIT_RELOAD); if((*s)->action_ACTION) _gc_eventaction(&(*s)->action_ACTION); if((*s)->eventlist) gc_event(&(*s)->eventlist); FREE((*s)->name); FREE((*s)->path); (*s)->next = NULL; FREE(*s); }