Fix: lttng-add-context: context type options possible null dereference
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Jul 2023 16:26:42 +0000 (12:26 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Jul 2023 16:26:42 +0000 (12:26 -0400)
commitca400a290a3e98e9f2578d4cbaede87019f2ee94
tree0e03299dd6433c6321b4c0efaf53c0920fd9ec6d
parentf40b76aed659ff694cf948bf8ebd1d4b5741c986
Fix: lttng-add-context: context type options possible null dereference

Coverity reports that:
** CID 1518091:  Null pointer dereferences  (FORWARD_NULL)
/src/bin/lttng/commands/add_context.cpp: 820 in destroy_ctx_type(<unnamed>::ctx_type *)(

Free application context options only if type->opt isn't null.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Icc27d04480c4821ed33127f5baf293510cdb314e
src/bin/lttng/commands/add_context.cpp
This page took 0.025064 seconds and 4 git commands to generate.