Fix: trigger: erroneous check for success of trigger creation
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 Nov 2020 22:12:45 +0000 (17:12 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 Nov 2020 22:14:41 +0000 (17:14 -0500)
6808ef55e added a check for `ret == 0` to determine if a trigger
could be created from a payload. The function returns >= 0 on
success, leading to crashes when a trigger is de-serialized.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Icd769dcb04f7637aa1877436e9a5570e7f20b63b

src/common/trigger.c

index e69e72e076267be0b7b6290b9032cc11b941caa1..e038fa81a052d71fe3952afaae96c96982a23ae3 100644 (file)
@@ -264,7 +264,7 @@ error:
        lttng_condition_put(condition);
        lttng_action_put(action);
 end:
-       if (ret == 0) {
+       if (ret >= 0) {
                *_trigger = trigger;
        } else {
                lttng_trigger_put(trigger);
This page took 0.034101 seconds and 4 git commands to generate.