return;
struct logger_config_data *data = (struct logger_config_data *)userdata;
- void *cmd = (void *)strdup(value);
+ char *cmd = strdup(value);
if (cmd)
list_add(&data->logfile_configs, cmd);
//ignore errors
* This will result in daemon quitting. Hopefully we will either reenable some of these
* in the future or at least make it exit more gracefully (TODO), but for now this is ok. */
g_backend.use_logger_by_default = false;
- data->logfile_configs = NULL;
goto end;
} else {
ret = -ENOENT;
data->buffers[buf_id].sort_by = sort_by;
}
}
- data->logfile_configs = NULL;
log_config_foreach(&conf, save_logfile_config, data);
data->default_format = get_default_format_from_config(&conf);
return ret;
}
-static bool cond_string_free(void *ptr, void *user_data)
-{
- (void) user_data;
- free(ptr);
- return true;
-}
-
#ifndef UNIT_TEST
static
#endif
void free_config_data(struct logger_config_data *data)
{
- list_remove_if(&data->logfile_configs, NULL, cond_string_free);
+ list_clear_free_contents(&data->logfile_configs);
free(data->dynamic_config_dir);
qos_free(data->qos);
free(data->first_time_file_path);