示例#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 _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);
}