audiod: free pointer to config file path.
authorAndre Noll <maan@systemlinux.org>
Tue, 4 Sep 2007 20:21:16 +0000 (22:21 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 4 Sep 2007 20:21:16 +0000 (22:21 +0200)
As it's no longer needed once the config file was parsed. Also, rename cf to
config_file.

audiod.c

index dd723233c75e481f3c0e342c1f4eb993a448c076..9b79121b3aa16f51662b9e7e2649e097f81b5a26 100644 (file)
--- 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, &params)) {
+               if (audiod_cmdline_parser_config_file(config_file, &conf, &params)) {
                        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);