kconsumer: clean-up: initialize ctf_index before populating it
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 15 Sep 2019 18:56:23 +0000 (14:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Sep 2019 19:31:49 +0000 (15:31 -0400)
commitb2d8a465c1a12737e0ed4ec30f3bd59a5c39ca36
tree6ab95bacd9f0623b620d02f1f9c7916ce8f4528a
parente484ee9bee1e7f3f24f00153953031f85c404727
kconsumer: clean-up: initialize ctf_index before populating it

The 'offset' field of the ctf_index is used uninitialized when it is
populated. Its uninitialized value is read and stored back.  This is
not a problem as the offset is populated later-on.

Coveity reports
1405630 Uninitialized scalar variable
The variable will contain an arbitrary value left from earlier computations.
In lttng_kconsumer_read_subbuffer: Use of an uninitialized variable (CWE-457)

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/kernel-consumer/kernel-consumer.c
This page took 0.029374 seconds and 4 git commands to generate.