Fix: add_trigger.c: `goto error` with a wrong UID for `--owner-uid`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 6 May 2021 20:10:01 +0000 (16:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 10 May 2021 19:17:02 +0000 (15:17 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I8650af1f43e8ed8bad58a928cfcdf78d382212f1

src/bin/lttng/commands/add_trigger.c

index 9c6b2cceb7714428092697b881d49a42241e0671..ac086891042d41af4c836f62b335e3a39ee78a7c 100644 (file)
@@ -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);
This page took 0.026676 seconds and 4 git commands to generate.