From: Jérémie Galarneau Date: Wed, 7 Apr 2021 15:54:17 +0000 (-0400) Subject: Fix: sessiond: kernel: missing check for unregistration error X-Git-Tag: v2.13.0-rc1~160 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=e689039f2e09f448a071f81e483824cf9ca212fb Fix: sessiond: kernel: missing check for unregistration error 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 --- 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();