From c7627a89bbd6696a667acf0f52cc8a4fe876d3f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 22 Apr 2021 14:50:55 -0400 Subject: [PATCH] Fix: error-query: uninitialized action_index value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit action_index will be used uninitialized if the user passes an action that is not part of the trigger (an API use error). CID 1452662 (#2 of 2): Uninitialized scalar variable (UNINIT) 14. uninit_use: Using uninitialized value action_index.is_set. Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: I9afc6730b5462f4bf55e0dba3454efb5b4ca22c9 --- src/common/error-query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/error-query.c b/src/common/error-query.c index a3663ad7c..8bee20397 100644 --- a/src/common/error-query.c +++ b/src/common/error-query.c @@ -127,7 +127,7 @@ extern struct lttng_error_query *lttng_error_query_action_create( const struct lttng_action *action) { struct lttng_error_query_action *query = NULL; - typeof(query->action_index) action_index; + typeof(query->action_index) action_index = {}; struct lttng_trigger *trigger_copy = NULL; if (!trigger || !action) { -- 2.34.1