Fix: sessiond: kernel: missing check for unregistration error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Apr 2021 15:54:17 +0000 (11:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Apr 2021 15:54:17 +0000 (11:54 -0400)
1451463 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.

In synchronize_tracer_notifier_unregister: A value assigned to a variable is never used. (CWE-563)

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

src/bin/lttng-sessiond/cmd.c

index 90a011fd9ad72a0f44efe2418d1706842e796dff..28e0df019cd2738fa8afff054ad8d0d55f6bb4c4 100644 (file)
@@ -4501,6 +4501,10 @@ enum lttng_error_code synchronize_tracer_notifier_unregister(
        switch (trigger_domain) {
        case LTTNG_DOMAIN_KERNEL:
                ret_code = kernel_unregister_event_notifier(trigger);
+               if (ret_code != LTTNG_OK) {
+                       goto end_unlock_session_list;
+               }
+
                break;
        case LTTNG_DOMAIN_UST:
                ust_app_global_update_all_event_notifier_rules();
This page took 0.034667 seconds and 4 git commands to generate.