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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:20 +0000 (11:58 -0400)
commit2388fb873ed903b3308984c39ec5fb1b509529ac
treebca3e49e7098528e1b5cce4c88ab8779829ce294
parent1c18d2279f2496cd153dc8f4bc88540824b76f0d
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.025796 seconds and 4 git commands to generate.