Fix: initialize the cur_event variable before using it
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 17 May 2016 15:52:47 +0000 (11:52 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 May 2016 20:39:12 +0000 (16:39 -0400)
CID 1243041 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized element of array *cur_event.name when
calling strcmp.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/list.c

index bcf2f0a5f0b44e5bc7c4cd36746d94c9adc33d92..796a01784ac9d9dd0f7c32cc80a760fe67141518 100644 (file)
@@ -573,6 +573,8 @@ static int mi_list_ust_event_fields(struct lttng_event_field *fields, int count,
        int event_element_open = 0;
        struct lttng_event cur_event;
 
+       memset(&cur_event, 0, sizeof(cur_event));
+
        /* Open domains element */
        ret = mi_lttng_domains_open(writer);
        if (ret) {
This page took 0.025915 seconds and 4 git commands to generate.