Fix: translate-trace-ir-to-ctf-ir.c: dereference after `NULL` check
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Aug 2019 18:57:00 +0000 (14:57 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Aug 2019 19:28:34 +0000 (15:28 -0400)
commitf965d8830c67a31333c70524729da1df7f3701e3
treecfe1c159c3ae517440ab97ec0888be75ad1647e2
parent2cdcf2d8d0e105ccc46a121f16f7733c0e417dd8
Fix: translate-trace-ir-to-ctf-ir.c: dereference after `NULL` check

We only need to call must_protect_variant_option_name() when the tag
field class is not created by the component (`fc->tag_is_before`).

Furthermore, the local `must_protect` variable is not used, so the
corresponding must_protect_variant_option_name() parameter is not
either. They are both removed. Because the
must_protect_variant_option_name() function actually sets the name of
the option to use (protecting it or not), it's renamed to
maybe_protect_variant_option_name().

Found by Coverity Scan.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ieccc0bcddc5570f473d4303f7cc470a56af65a9e
src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c
This page took 0.025708 seconds and 4 git commands to generate.