예제 #1
0
파일: cfg.c 프로젝트: Amey-Jain/syslog-ng
void
cfg_free(GlobalConfig *self)
{
  g_assert(self->persist == NULL);
  if (self->state)
    persist_state_free(self->state);

  g_free(self->file_template_name);
  g_free(self->proto_template_name);  
  log_template_unref(self->file_template);
  log_template_unref(self->proto_template);
  log_template_options_destroy(&self->template_options);
  host_resolve_options_destroy(&self->host_resolve_options);

  if (self->bad_hostname_compiled)
    regfree(&self->bad_hostname);
  g_free(self->bad_hostname_re);
  dns_cache_options_destroy(&self->dns_cache_options);
  g_free(self->custom_domain);
  plugin_free_plugins(self);
  plugin_free_candidate_modules(self);
  cfg_tree_free_instance(&self->tree);
  g_hash_table_unref(self->module_config);
  g_free(self);
}
예제 #2
0
파일: cfg.c 프로젝트: tiltti/syslog-ng-3.4
void
cfg_free(GlobalConfig *self)
{
  g_assert(self->persist == NULL);
  if (self->state)
    persist_state_free(self->state);

  g_free(self->file_template_name);
  g_free(self->proto_template_name);  
  log_template_unref(self->file_template);
  log_template_unref(self->proto_template);

  if (self->bad_hostname_compiled)
    regfree(&self->bad_hostname);
  g_free(self->bad_hostname_re);
  g_free(self->dns_cache_hosts);
  g_list_free(self->plugins);
  plugin_free_candidate_modules(self);
  cfg_tree_free_instance(&self->tree);
  g_free(self);
}