int ret = 0, c = 0, option_index = 0;
int orig_optopt = optopt, orig_optind = optind;
char *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);
}
end:
+ free(config_path);
free(optstring);
return ret;
}
struct lttng_triggers *triggers = NULL;
unsigned int trigger_count, i;
const struct lttng_credentials creds = {
- .uid = LTTNG_OPTIONAL_INIT_VALUE(0),
+ .uid = LTTNG_OPTIONAL_INIT_VALUE(0),
};
DBG("Unregistering all triggers");
assert(trigger_status == LTTNG_TRIGGER_STATUS_OK);
trigger_status = lttng_trigger_get_name(trigger, &trigger_name);
- assert(trigger_status == LTTNG_TRIGGER_STATUS_OK);
+ trigger_name = trigger_status == LTTNG_TRIGGER_STATUS_OK ?
+ trigger_name : "(anonymous)";
DBG("Unregistering trigger: trigger owner uid = %d, trigger name = '%s'",
(int) trigger_owner, trigger_name);