예제 #1
0
파일: gc.c 프로젝트: AsydSolutions/monit
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);
}
예제 #2
0
파일: gc.c 프로젝트: andreax79/monit
static void _gcgrc(Generic_T *g) {

  ASSERT(g);

  if((*g)->next)
    _gcgrc(&(*g)->next);

  FREE((*g)->send);
#ifdef HAVE_REGEX_H
  if ((*g)->expect!=NULL)
    regfree((*g)->expect);
#endif
  FREE((*g)->expect);
  FREE(*g);
    
}
예제 #3
0
파일: gc.c 프로젝트: andreax79/monit
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);
}