Fix: lttng: remove-trigger: null dereference on MI initialization error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 5 Jul 2021 18:21:19 +0000 (14:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 6 Jul 2021 21:48:03 +0000 (17:48 -0400)
commitfc63f82bc420d29f2f55f447f7a76b2a1503e4eb
treed0b31bb08011fbfd727f592532feafe29b468de7
parent7163713018cfa78aa7dc6b58dcac8c6a16ff8e24
Fix: lttng: remove-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: I0bc71bf6c83df7d9d938cf93a12d5f6cf6d7ae36
src/bin/lttng/commands/remove_trigger.c
This page took 0.025369 seconds and 4 git commands to generate.