From e689039f2e09f448a071f81e483824cf9ca212fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 7 Apr 2021 11:54:17 -0400 Subject: [PATCH 1/1] Fix: sessiond: kernel: missing check for unregistration error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Change-Id: Iaea550a2d70730cc4c90f8d1bdcd8cc0a4af6bd8 --- src/bin/lttng-sessiond/cmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 90a011fd9..28e0df019 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -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(); -- 2.34.1