diff --git a/src/server/configuration.c b/src/server/configuration.c index 01241bde..97440093 100644 --- a/src/server/configuration.c +++ b/src/server/configuration.c @@ -85,9 +85,10 @@ void free_config_options(configoption_t * opts, int *num) DOTCONF_CB(cb_ ## name) \ { \ assert(cmd->data.str != NULL); \ - if (!cl_spec_section) \ + if (!cl_spec_section) { \ + free(GlobalFDSet.arg); \ GlobalFDSet.arg = g_strdup(cmd->data.str); \ - else \ + } else \ cl_spec_section->val.arg = g_strdup(cmd->data.str); \ return NULL; \ } diff --git a/src/server/module.c b/src/server/module.c index b6810a9c..4e2bc408 100644 --- a/src/server/module.c +++ b/src/server/module.c @@ -400,6 +400,7 @@ OutputModule *load_output_module(const char *mod_name, const char *mod_prog, module_conf_dir = g_strdup_printf("%s/modules", SpeechdOptions.conf_dir); MSG(4, "%s does not exist, looking in %s", module->configfilename, module_conf_dir); + g_free(module->configfilename); module->configfilename = (char *)spd_get_path(mod_cfgfile, module_conf_dir); g_free(module_conf_dir);