Fix: babeltrace2-cfg-cli-args.c: uninitialized pointer read
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Aug 2019 18:42:53 +0000 (14:42 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Aug 2019 19:28:34 +0000 (15:28 -0400)
Found by Coverity Scan.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Iaf8c35247a61562ab745b734d523831f2ea68be8

src/cli/babeltrace2-cfg-cli-args.c

index e962ff361dfe48370f07ab5d33a0b09750300d02..e50a3d236f0f5639a3eb7251239d1c8a33b42557 100644 (file)
@@ -1415,7 +1415,7 @@ struct bt_config *bt_config_help_from_args(int argc, const char *argv[],
        struct bt_config *cfg = NULL;
        const char *non_opt = NULL;
        char *plugin_name = NULL, *comp_cls_name = NULL;
-       struct bt_argpar_parse_ret argpar_parse_ret;
+       struct bt_argpar_parse_ret argpar_parse_ret = { 0 };
 
        *retcode = 0;
        cfg = bt_config_help_create(initial_plugin_paths, default_log_level);
@@ -1584,7 +1584,7 @@ struct bt_config *bt_config_query_from_args(int argc, const char *argv[],
        const char *query_object = NULL;
        bt_value *params;
        GString *error_str = NULL;
-       struct bt_argpar_parse_ret argpar_parse_ret;
+       struct bt_argpar_parse_ret argpar_parse_ret = { 0 };
 
        params = bt_value_null;
        bt_value_get_ref(bt_value_null);
This page took 0.026394 seconds and 4 git commands to generate.