Fix: lttng: add-trigger: null dereference on MI initialization error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 5 Jul 2021 18:16:00 +0000 (14:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Jul 2021 21:31:33 +0000 (17:31 -0400)
commit1e0b19a257a7fe8307103757def955010cb5a03e
tree5b8203f35e0a583de50225ccab0c2b3e101eb821
parentef3db6b0dfed5ed81ba8afd57fcb2d2eb0119e39
Fix: lttng: add-trigger: null dereference on MI initialization error

Failures to create an MI writer instance will result in a dereference of
the MI writer when attempting to close the command's output element.

1457842 Dereference after null check

Either the check against null is unnecessary, or there may be a null
pointer dereference.

In cmd_add_trigger: Pointer is checked against null but then
dereferenced anyway (CWE-476)

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I98b844d2f1c7abd43bd42ee472759de57b34484e
src/bin/lttng/commands/add_trigger.c
This page took 0.025704 seconds and 4 git commands to generate.