From 7c11e1acf8efc93b36fcae77c3f0ce04ae491c23 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 4 Sep 2007 22:21:16 +0200 Subject: [PATCH] audiod: free pointer to config file path. As it's no longer needed once the config file was parsed. Also, rename cf to config_file. --- audiod.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/audiod.c b/audiod.c index dd723233..9b79121b 100644 --- a/audiod.c +++ b/audiod.c @@ -1120,7 +1120,7 @@ static void set_initial_status(void) * */ int main(int argc, char *argv[]) { - char *cf; + char *config_file; int ret, i; struct sched s; struct command_task command_task_struct, *cmd_task = &command_task_struct; @@ -1130,8 +1130,8 @@ int main(int argc, char *argv[]) audiod_cmdline_parser(argc, argv, &conf); HANDLE_VERSION_FLAG("audiod", conf); para_drop_privileges(conf.user_arg, conf.group_arg); - cf = configfile_exists(); - if (cf) { + config_file = configfile_exists(); + if (config_file) { struct audiod_cmdline_parser_params params = { .override = 0, .initialize = 0, @@ -1139,10 +1139,11 @@ int main(int argc, char *argv[]) .check_ambiguity = 0 }; - if (audiod_cmdline_parser_config_file(cf, &conf, ¶ms)) { + if (audiod_cmdline_parser_config_file(config_file, &conf, ¶ms)) { PARA_EMERG_LOG("%s", "parse error in config file\n"); exit(EXIT_FAILURE); } + free(config_file); } if (conf.logfile_given) logfile = open_log(conf.logfile_arg); -- 2.39.5