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>
Tue, 6 Jul 2021 21:47:37 +0000 (17:47 -0400)
commit4627fa543a2eb65d7b046b18e015986f45de5835
tree8b370c05b230257cc9ef9afb8582c61754cc3805
parentf674361c665441a78fc1db5794a4f28965ff9d26
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.02508 seconds and 4 git commands to generate.