int c, ret = 0, option_index = 0, retval = 0;
int orig_optopt = optopt, orig_optind = optind;
char *default_address, *optstring;
- const char *config_path = NULL;
+ char *config_path = NULL;
optstring = utils_generate_optstring(long_options,
sizeof(long_options) / sizeof(struct option));
WARN("Getting '%s' argument from setuid/setgid binary refused for security reasons.",
"-f, --config");
} else {
+ free(config_path);
config_path = utils_expand_path(optarg);
if (!config_path) {
ERR("Failed to resolve path: %s", optarg);
}
exit:
+ free(config_path);
free(optstring);
return retval;
}