From: Andre Noll Date: Tue, 4 Sep 2007 20:21:16 +0000 (+0200) Subject: audiod: free pointer to config file path. X-Git-Tag: v0.2.17~14 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=7c11e1acf8efc93b36fcae77c3f0ce04ae491c23;ds=sidebyside 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. --- 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);