From: Philippe Proulx Date: Thu, 6 May 2021 20:10:01 +0000 (-0400) Subject: Fix: add_trigger.c: `goto error` with a wrong UID for `--owner-uid` X-Git-Tag: v2.13.0-rc2~21 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=07e2945333c873bb8b688d80b5ea6f7a451f3296;p=lttng-tools.git Fix: add_trigger.c: `goto error` with a wrong UID for `--owner-uid` Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau Change-Id: I8650af1f43e8ed8bad58a928cfcdf78d382212f1 --- diff --git a/src/bin/lttng/commands/add_trigger.c b/src/bin/lttng/commands/add_trigger.c index 9c6b2cceb..ac0868910 100644 --- a/src/bin/lttng/commands/add_trigger.c +++ b/src/bin/lttng/commands/add_trigger.c @@ -2200,6 +2200,7 @@ int cmd_add_trigger(int argc, const char **argv) uid = strtol(owner_uid, &end, 10); if (end == owner_uid || *end != '\0' || errno != 0) { ERR("Failed to parse `%s` as a user id.", owner_uid); + goto error; } trigger_status = lttng_trigger_set_owner_uid(trigger, uid);