From: Jérémie Galarneau Date: Thu, 22 Apr 2021 18:50:55 +0000 (-0400) Subject: Fix: error-query: uninitialized action_index value X-Git-Tag: v2.13.0-rc1~18 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c7627a89bbd6696a667acf0f52cc8a4fe876d3f1;p=lttng-tools.git Fix: error-query: uninitialized action_index value 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 --- 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) {